日期:2014-05-17 浏览次数:21205 次
public class T_Public_Depart
{
#region Depart
private int mDepart = 0;
/// <summary>
/// [DataField("科室")]
/// [DataType(Int32)]
/// [DataSize(4)]
/// </summary>
public int Depart
{
get { return mDepart;}
set { mDepart = value;}
}
#endregion Depart
#region DepartName
private string mDepartName = "";
/// <summary>
/// [DataField("科室名称")]
/// [DataType(AnsiString)]
/// [DataSize(32)]
/// </summary>
public string DepartName
{
get { return mDepartName;}
set { mDepartName = value;}
}
#endregion DepartName
#region DepartAB
private string mDepartAB = "";
/// <summary>
/// [DataField("科室简称")]
/// [DataType(AnsiString)]
/// [DataSize(16)]
/// </summary>
public string DepartAB
{
get { return mDepartAB;}
set { mDepartAB = value;}
}
#endregion DepartAB
}
例如
T_Public_Depart mDepart1 = new T_Public_Depart();
mDepart1.Depart = 1;
mDepart1.DepartName = "Test Depart";
mDepart1.DepartAB = "Test";
T_Public_Depart mDepart2 = new T_Public_Depart();
要求通过反射把mDepart1中每个字段的值搬到mDepart2中。不可以两个直接对等赋值。