_Type.GetNestedType 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.
Provides COM objects with version-independent access to the GetNestedType method.
Overloads
GetNestedType(String) |
Provides COM objects with version-independent access to the GetNestedType(String) method. |
GetNestedType(String, BindingFlags) |
Provides COM objects with version-independent access to the GetNestedType(String, BindingFlags) method. |
Remarks
This method is for access to managed classes from unmanaged code, and should not be called from managed code.
The Type.GetNestedType method gets a specific type nested within the current Type.
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
Parameters
- name
- String
The string containing the name of the nested type to get.
Returns
A Type object representing the public nested type with the specified name, if found; otherwise, null
.
Remarks
This method is for access to managed classes from unmanaged code, and should not be called from managed code.
The Type.GetNestedType method searches for the public nested type with the specified name.
Applies to
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
Parameters
- name
- String
The string containing the name of the nested type to get.
- bindingAttr
- BindingFlags
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.
-or-
Zero, to return null
.
Returns
A Type object representing the nested type that matches the specified requirements, if found; otherwise, null
.
Remarks
This method is for access to managed classes from unmanaged code, and should not be called from managed code.
The Type.GetNestedType method searches for the specified nested type, using the specified binding constraints.