lundi 25 février 2019

Attributes on Field in Class

I want to get a list of fields with an Attribute Sync.Field on each of the field in the class. The field can / cannot have the attribute of

I have been trying the following, but having trouble getting the custom attribute for each field.

FieldInfo[] fiClass = typClass.GetFields();

FieldInfo[] lst = fiClass.Where(c => c.CustomAttribute().GetType() == typeOf(Sync.Field).ToList();





Aucun commentaire:

Enregistrer un commentaire