TypeAttributes Enumeration
Specifies attributes that control the properties of a type or that control how a type is accessed by code outside the type.
Namespace:
System.Reflection
Assembly:
mscorlib.dll
Members
Name | Value | Description |
---|---|---|
AnsiClass |
0x00000000 |
The type has an ANSI class character set. |
AutoClass |
0x00000100 |
The type has an auto class character set. |
BeforeFieldInit |
0x00100000 |
The type initializer is executed before the first instance of the type is created or static fields are accessed. This is a characteristic of type constructors. |
Class |
0x00000020 |
The type is a nested type that is not visible outside the defining type. |
CustomFormatClass |
0x00000200 |
The type has a custom character set. |
ExplicitLayout |
0x00000080 |
The type has explicit layout. |
Import |
0x00001000 |
The type definition is not found or the type is not defined. |
Interface |
0x00000002 |
The type is an interface. |
LayoutMask |
0x00000300 |
Mask to examine the type's layout. |
NestedAssembly |
0x00000003 |
The type is a nested type that is visible by entry point, such as a program or a DLL. |
NestedFamAndAssem |
0x00000006 |
The type is a nested type that is visible by entry point, such as a program or a DLL, and is nested within a type that is visible by entry point, such as a program or a DLL. |
NestedFamily |
0x00000004 |
The type is a nested type that is visible only to its own family, or to classes that contain it. |
NestedFamORAssem |
0x00000008 |
The type is a nested type that is visible by entry point, such as a program or a DLL, or to its own family, or to classes that contain it. |
NestedPrivate |
0x00000001 |
The type is a nested type that is visible only to its own class. |
NestedPublic |
0x00000005 |
The type is a nested type that is visible only to the parent type. |
NotPublic |
0x00000000 |
The type is not public. |
Sealed |
0x00010000 |
The type is sealed. |
SequentialLayout |
0x00000010 |
The type has sequential layout. |
StringFormatMask |
0x00030000 |
Mask to examine the type's string information. |
UnicodeClass |
0x00000400 |
The type has a Unicode class character set. |
Remarks
The TypeAttributes
enumeration specifies attributes that control the properties of a type or that control how a type is accessed by code outside the type. These attributes are used by the Reflection API to describe and manipulate types at runtime.
The attributes are divided into several categories, including visibility, layout, and specific type characteristics like whether it's an interface or a sealed class.