GlobalScope.GetField(String, Int32) 方法

定义

通过搜索范围层次结构来获取具有指定名称的字段。Gets 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.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 override System::Reflection::FieldInfo ^ GetField(System::String ^ name, int lexLevel);
public override System.Reflection.FieldInfo GetField (string name, int lexLevel);
override this.GetField : string * int -> System.Reflection.FieldInfo
Public Overrides Function GetField (name As String, lexLevel As Integer) As FieldInfo

参数

name
String

要搜索的字段的名称。The name of the field to search for.

lexLevel
Int32

要搜索的词法级别。The lexical level to search.

返回

FieldInfo

具有指定名称的字段。A field that has the specified name.

适用于

另请参阅