Object. Get Field(String, Int32) Method
Returns a field that has the specified name by searching the scope hierarchy. This method searches only the scope that is specified by the lexical level.
This API supports the product infrastructure and is not intended to be used directly from your code.
public: virtual System::Reflection::FieldInfo ^ GetField(System::String ^ name, int lexLevel);
public virtual System.Reflection.FieldInfo GetField (string name, int lexLevel);
override this.GetField : string * int -> System.Reflection.FieldInfo
Public Overridable Function GetField (name As String, lexLevel As Integer) As FieldInfo
The name of the field to search for.
The lexical level to search.
A FieldInfo object that has the specified name.
This method applies to fields that cannot be resolved at compile time. This occurs when an
eval expression refers to a field in the outer scope. Because the
eval expression can declare a local field that has the same name as a field in the outer scope, the field cannot be early bound to the outer scope field.