我注意到.NET核心不允许,myObj.GetType().GetProperties()因为没有GetProperties方法存在.有没有其他方法通过反射获得类的属性?
Mos*_*aou 11
只是总结给其他人,只是添加using System.Reflection到页面顶部是不够的.您将必须System.Reflection.TypeExtensions按问题注释中的描述添加NuGet包.
PM> Install-Package System.Reflection.TypeExtensions -Version 4.3.0
| 归档时间: |
|
| 查看次数: |
9933 次 |
| 最近记录: |