foreach (PropertyInfo propertyInfo in base.GetType().GetProperties())
{
if (propertyInfo.CanWrite)
{
propertyInfo.SetValue(this, tag, null);
}
}
一次性设置设置所有属性值,当然要保证属性的类型相同
猜你喜欢
转载自www.cnblogs.com/atuo/p/8963046.html
今日推荐
周排行