_Type.GetNestedType _Type.GetNestedType _Type.GetNestedType _Type.GetNestedType Method

定义

为 COM 对象提供对 GetNestedType 方法的版本无关的访问。Provides COM objects with version-independent access to the GetNestedType method.

重载

GetNestedType(String) GetNestedType(String) GetNestedType(String) GetNestedType(String)

为 COM 对象提供对 GetNestedType(String) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetNestedType(String) method.

GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags)

为 COM 对象提供对 GetNestedType(String, BindingFlags) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetNestedType(String, BindingFlags) method.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetNestedType方法获取特定类型嵌套在当前TypeThe Type.GetNestedType method gets a specific type nested within the current Type.

GetNestedType(String) GetNestedType(String) GetNestedType(String) GetNestedType(String)

为 COM 对象提供对 GetNestedType(String) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetNestedType(String) method.

public:
 Type ^ GetNestedType(System::String ^ name);
public Type GetNestedType (string name);
abstract member GetNestedType : string -> Type
Public Function GetNestedType (name As String) As Type

参数

name
String String String String

包含要获取的嵌套类型的名称的字符串。The string containing the name of the nested type to get.

返回

如找到,则为表示具有指定名称的公共嵌套类型的 Type 对象;否则为 nullA Type object representing the public nested type with the specified name, if found; otherwise, null.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetNestedType方法搜索具有指定名称的公共嵌套类型。The Type.GetNestedType method searches for the public nested type with the specified name.

GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags)

为 COM 对象提供对 GetNestedType(String, BindingFlags) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetNestedType(String, BindingFlags) method.

public:
 Type ^ GetNestedType(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public Type GetNestedType (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetNestedType : string * System.Reflection.BindingFlags -> Type
Public Function GetNestedType (name As String, bindingAttr As BindingFlags) As Type

参数

name
String String String String

包含要获取的嵌套类型的名称的字符串。The string containing the name of the nested type to get.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

一个位屏蔽,由一个或多个指定搜索执行方式的 BindingFlags 组成。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

- 或 --or- 零,以返回 nullZero, to return null.

返回

表示符合指定要求的嵌套类型的 Type 对象(如果找到);否则为 nullA Type object representing the nested type that matches the specified requirements, if found; otherwise, null.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetNestedType方法搜索指定的嵌套类型,并使用指定的绑定约束。The Type.GetNestedType method searches for the specified nested type, using the specified binding constraints.

适用于