1. 程式人生 > >C#獲取類屬性

C#獲取類屬性

bsp inf info string nbsp obj list getprop null

C#獲取類屬性

Type t = fxsinfo.GetType();
PropertyInfo[] PropertyList = t.GetProperties();
foreach (PropertyInfo item in PropertyList)
{
string name = item.Name;
object value = item.GetValue(fxsinfo, null);
data.Add(name, value.AsString());
}

C#獲取類屬性