Method GetFieldsWithAttribute
GetFieldsWithAttribute(Type, Type, List<FieldInfo>, BindingFlags)
Get the fields with attribute of attributeType in type.
Declaration
public static void GetFieldsWithAttribute(this Type type, Type attributeType, List<FieldInfo> fields, BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type in which to search for the attribute. |
| Type | attributeType | The attribute type for which to search. |
| List<FieldInfo> | fields | A list containing the FieldInfo of the fields with the attribute specified by |
| BindingFlags | bindingAttr | Binding flags of the attribute. |