2015年4月17日

foreach 物件屬性

foreach (PropertyInfo property in obj.GetType().GetProperties())
{
if (property.GetValue(obj, null) != null)
{
property.SetValue(obj, "");
}
}

沒有留言:

張貼留言