Module.GetField Module.GetField Module.GetField Module.GetField Method

Definition

Returns a specified field.

Overloads

GetField(String) GetField(String) GetField(String) GetField(String)

Returns a field having the specified name.

GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)

Returns a field having the specified name and binding attributes.

GetField(String) GetField(String) GetField(String) GetField(String)

Returns a field having the specified name.

public:
 System::Reflection::FieldInfo ^ GetField(System::String ^ name);
public System.Reflection.FieldInfo GetField (string name);
member this.GetField : string -> System.Reflection.FieldInfo
Public Function GetField (name As String) As FieldInfo

Parameters

name
String String String String

The field name.

Returns

A FieldInfo object having the specified name, or null if the field does not exist.

Exceptions

GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)

Returns a field having the specified name and binding attributes.

public:
 virtual System::Reflection::FieldInfo ^ GetField(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public virtual System.Reflection.FieldInfo GetField (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetField : string * System.Reflection.BindingFlags -> System.Reflection.FieldInfo
override this.GetField : string * System.Reflection.BindingFlags -> System.Reflection.FieldInfo
Public Overridable Function GetField (name As String, bindingAttr As BindingFlags) As FieldInfo

Parameters

name
String String String String

The field name.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

One of the BindingFlags bit flags used to control the search.

Returns

A FieldInfo object having the specified name and binding attributes, or null if the field does not exist.

Exceptions

Applies to