且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Assembly.GetTypes()返回奇怪的类型名称,例如<> c>

更新时间:2022-11-30 10:40:06

这些是编译器生成的显示类。您可以通过查找 CompilerGeneratedAttribute

These are compiler generated display classes. You can distinguish them by looking for the CompilerGeneratedAttribute:

var attr = Attribute.GetCustomAttribute(type, typeof(CompilerGeneratedAttribute));