Method GetFieldsRecursively
GetFieldsRecursively(Type, List<FieldInfo>, BindingFlags)
Gets all fields of the Type or any of its base Types.
Declaration
public static void GetFieldsRecursively(this Type type, List<FieldInfo> fields, BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type we are going to get fields on. |
List<FieldInfo> | fields | A list to which all fields of this type will be added. |
BindingFlags | bindingAttr | A bitmask specifying how the search is conducted. |