I am trying to create a custom attribute check for webform projects.
I can already get all the properties from my class, but now I donβt know how to filter them, and just get properties that have some attribute.
For example:
PropertyInfo[] fields = myClass.GetType().GetProperties();
This will return all the properties to me. But how can I just return the properties using an attribute of type testAttribute, for example?
I have already searched for this, but after several attempts to solve this problem, I decided to ask here.
c # system.reflection
Guilherme cardoso
source share