📜  c# 从属性中获取自定义属性 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:00.199000             🧑  作者: Mango

代码示例1
PropertyInfo[] propertyInfos = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
PropertyInfo p = propertyInfos.Where(x => x.GetCustomAttribute() != null && x.GetCustomAttribute().PropertyName == "xx");