Method GetFieldInTypeOrBaseType
GetFieldInTypeOrBaseType(Type, string)
Search by name through a fields of a type and its base types and return the field if one is found.
Declaration
public static FieldInfo GetFieldInTypeOrBaseType(this Type type, string fieldName)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to search. |
string | fieldName | The name of the field to search for. |
Returns
Type | Description |
---|---|
FieldInfo | The field, if found. |