一次性设置设置所有属性值,当然要保证属性的类型相同
foreach (PropertyInfo propertyInfo in base.GetType().GetProperties())
{
if (propertyInfo.CanWrite)
{
propertyInfo.SetValue(this, tag, null);
}
}

浙公网安备 33010602011771号