ModuleBuilder.DefineType Method (String)

Defines a private type with the specified name in this module.

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

[SecuritySafeCriticalAttribute]
public TypeBuilder DefineType(
	string name
)

Parameters

name
Type: System.String
The full name of the type, including the namespace. name cannot contain embedded nulls.

Return Value

Type: System.Reflection.Emit.TypeBuilder
A private type with the specified name.

ExceptionCondition
ArgumentException

A type with the given name exists in the parent assembly of this module.

-or-

Nested type attributes are set on a type that is not nested.

ArgumentNullException

name is null.

Type names must be unique within an assembly. Private types can be used only within the dynamic module.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: