GetField Method (String)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Searches for the public field with the specified name.
Assembly: mscorlib (in mscorlib.dll)
- Type: System..::..String
The string containing the name of the data field to get.
Return ValueType: System.Reflection..::..FieldInfo
An object representing the public field with the specified name, if found; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic).
The search for name is case-sensitive. The search includes public static and public instance fields.
If the current Type represents a type parameter in the definition of a generic type or generic method, this method searches the fields of the class constraint.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.