//将saddle中每一个属性赋值给到WebPlate中的同名属性
foreach (PropertyInfo info in saddle.GetType().GetProperties())
{
try
{
string objString = info.Name;
object objValue = saddle.GetType().GetProperty(objString).GetValue(saddle, null);
this.GetType().GetProperty(objString).SetValue(this, objValue, null);
}
catch
{
}
}
时间: 2024-11-06 03:36:36