反射的类:
public class Test
{
public testType testType { get; private set; }
public Test()
{
}
}
设置Test类中的testType 的值
Test test = new Test();
Type type = test.GetType();
PropertyInfo propertyInfo = type.GetProperty("testType");
PropertyInfo propertyInfo1 = propertyInfo.DeclaringType.GetProperty("testType");
propertyInfo1.SetValue(test, testType.test1);