...
...
View Code ...
...
PhysiqueOutModel physiqueOutModel = new PhysiqueOutModel ();//自定义对象 Type t = physiqueOutModel.GetType();//获得该类的Type foreach (PropertyInfo pi ...
//这是一个json字符串 string str="{\"id\":1,\"name\":\"张三\",\"time\":\"2018-05-02T09:02:32.1869172+08:00\",\"money\":23.4,\"str\":[\"a\",\"b\",\"c ...
运行结果如下 可以看出两次输出结果是一样的。 ...
比如我现在有一个Student的对象,里面有属性stuName,stuAge,stuGender,我现在该怎么写循环才能遍历这几个属性? Student s=new...... foreach (System.Reflection.PropertyInfo p ...