Skip to Main Content
C# in a Nutshell
book

C# in a Nutshell

by Ben Albahari, Ted Neward, Peter Drayton
March 2002
Intermediate to advanced content levelIntermediate to advanced
864 pages
31h 8m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell

Name

TypeAttributes

Synopsis

These attributes can be applied to a type. A type is either a class or interface, so either Class or Interface must be set. Most of the modifiers share the same keywords with C#, so they are easy to understand. The values prefixed with Nested indicate a class that is nested as well as its visibility.

public enum TypeAttributes {
   Class = 0x00000000,
   AutoLayout = 0x00000000,
   AnsiClass = 0x00000000,
   NotPublic = 0x00000000,
   Public = 0x00000001,
   NestedPublic = 0x00000002,
   NestedPrivate = 0x00000003,
   NestedFamily = 0x00000004,
   NestedAssembly = 0x00000005,
   NestedFamANDAssem = 0x00000006,
   VisibilityMask = 0x00000007,
   NestedFamORAssem = 0x00000007,
   SequentialLayout = 0x00000008,
   ExplicitLayout = 0x00000010,
   LayoutMask = 0x00000018,
   Interface = 0x00000020,
   ClassSemanticsMask = 0x00000020,
   Abstract = 0x00000080,
   Sealed = 0x00000100,
   SpecialName = 0x00000400,
   RTSpecialName = 0x00000800,
   Import = 0x00001000,
   Serializable = 0x00002000,
   UnicodeClass = 0x00010000,
   AutoClass = 0x00020000,
   StringFormatMask = 0x00030000,
   HasSecurity = 0x00040000,
   ReservedMask = 0x00040800,
   BeforeFieldInit = 0x00100000
}

Hierarchy

System.ObjectSystem.ValueTypeSystem.Enum(System.IComparable, System.IFormattable, System.IConvertible)TypeAttributes

Returned By

System.Type.{Attributes, GetAttributeFlagsImpl()}

Passed To

System.Reflection.Emit.ModuleBuilder.{DefineEnum(), DefineType()}, System.Reflection.Emit.TypeBuilder.DefineNestedType()

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 8.0 in a Nutshell

C# 8.0 in a Nutshell

Joseph Albahari, Eric Johannsen
C# 10 in a Nutshell

C# 10 in a Nutshell

Joseph Albahari
C# in a Nutshell, Second Edition

C# in a Nutshell, Second Edition

Peter Drayton, Ben Albahari, Ted Neward
Code like a Pro in C#

Code like a Pro in C#

Jort Rodenburg

Publisher Resources

ISBN: 0596001819Catalog PageErrata