EnumBuilder::GetNestedType Method (String^, BindingFlags)

 

Returns the specified nested type that is declared by this type.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual Type^ GetNestedType(
	String^ name,
	BindingFlags bindingAttr
) override

Parameters

name
Type: System::String^

The String containing the name of the nested type to get.

bindingAttr
Type: System.Reflection::BindingFlags

A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

Zero, to conduct a case-sensitive search for public methods.

Return Value

Type: System::Type^

A Type object representing the nested type that matches the specified requirements, if found; otherwise, null.

Exception Condition
NotSupportedException

This method is not currently supported in types that are not complete.

As a workaround, to retrieve the nested type of a finished type, retrieve the type using Type::GetType or Assembly::GetType and use reflection on the retrieved type.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: