C# 枚举反射应用获取特性
C# 枚举反射应用获取特性
var attrs = type.GetFields(BindingFlags.Public | BindingFlags.Static);
foreach (var item in attrs)
{
ModelAttribute terminal = (ModelAttribute)Attribute.GetCustomAttribute(item, typeof(ModelAttribute), false);
}
var attrs = type.GetFields(BindingFlags.Public | BindingFlags.Static);