IActivationObject.GetField(String, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When implemented in a class, 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:
System::Reflection::FieldInfo ^ GetField(System::String ^ name, int lexLevel);
public System.Reflection.FieldInfo GetField (string name, int lexLevel);
abstract member GetField : string * int -> System.Reflection.FieldInfo
Public Function GetField (name As String, lexLevel As Integer) As FieldInfo
Parameters
- name
- String
The name of the field to search for.
- lexLevel
- Int32
The lexical level to search.
Returns
A FieldInfo object that has the specified name.
Remarks
This method applies to fields that cannot be resolved at compile time. This happens when an eval
expression refers to a field in the outer scope. Because the eval
expression can declare a local field with the same name, the field cannot be early bound to the outer scope field.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om