Method EnumFields
EnumFields(Type, bool, BindingFlags)
Enumerates field information for the specified Type.
public static IEnumerable<FieldInfo> EnumFields(Type type, bool sort = false, BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public)
Parameters
type
TypeType which fields are enumerated.
sort
boolDefines whether to sort returned fields by name.
bindingFlags
BindingFlagsSpecifies flags that control the way in which the search for members is conducted.