using system; [serializable] public class serialemployee { public int employeeid public string lastname; public string firstname; public int yearsservice; public double salary; public serialemployee() { employeeid = 0; lastname = null; firstname = null; yearsservice = 0; salary = 0.0; } } 为了使用该类来传输数据,必须现创建一个library文件: