我注意到.NET core不允许,myObj.GetType().GetProperties()因为不GetProperties存在任何方法。还有另一种通过反射获取类属性的方法吗?
myObj.GetType().GetProperties()
GetProperties
这似乎myObj.GetType().GetProperties()是有效的。我不得不通过的System.Reflection带来using System.Reflection。
using System.Reflection
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
点击生成二维码
我来说两句