Hello,
Try this:
List<PropertyInfo> result =
typeof(MyDataClass)
.GetProperties()
.Where(
p =>
p.GetCustomAttributes(typeof(MyCustomAttribute), true)
.Where(ca => ((MyCustomAttribute)ca).UserAge)
.Any()
)
.ToList();
João Sousa (MCTS) Senior Software Engineer
No comments:
Post a Comment