111,094
社区成员




Rootobject config = new Rootobject();
PropertyInfo[] propertys = config.GetType().GetProperties();
foreach (var property in propertys)
{
if (property.PropertyType == typeof(string))
{
property.SetValue(config, "1111", null);
}
else if (property.PropertyType == typeof(Entry[]))
{
Entry[] entry = {
new Entry
{
A1 = "2222",
B1 = "2222"
},
new Entry
{
A1 = "3333",
B1 = "3333"
}
};
property.SetValue(config, entry, null);
}
}