The Labs \ Source Viewer \ SSCLI \ System.Reflection \ TypeAttributes

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. namespace System.Reflection
  16. {
  17.     using System.Runtime.InteropServices;
  18.     using System;
  19.     // This Enum matchs the CorTypeAttr defined in CorHdr.h
  20.     [Serializable(), Flags()]
  21.     [System.Runtime.InteropServices.ComVisible(true)]
  22.     public enum TypeAttributes
  23.     {
  24.         VisibilityMask = 7,
  25.         NotPublic = 0,
  26.         // Class is not public scope.
  27.         Public = 1,
  28.         // Class is public scope.
  29.         NestedPublic = 2,
  30.         // Class is nested with public visibility.
  31.         NestedPrivate = 3,
  32.         // Class is nested with private visibility.
  33.         NestedFamily = 4,
  34.         // Class is nested with family visibility.
  35.         NestedAssembly = 5,
  36.         // Class is nested with assembly visibility.
  37.         NestedFamANDAssem = 6,
  38.         // Class is nested with family and assembly visibility.
  39.         NestedFamORAssem = 7,
  40.         // Class is nested with family or assembly visibility.
  41.         // Use this mask to retrieve class layout informaiton
  42.         // 0 is AutoLayout, 0x2 is SequentialLayout, 4 is ExplicitLayout
  43.         LayoutMask = 24,
  44.         AutoLayout = 0,
  45.         // Class fields are auto-laid out
  46.         SequentialLayout = 8,
  47.         // Class fields are laid out sequentially
  48.         ExplicitLayout = 16,
  49.         // Layout is supplied explicitly
  50.         // end layout mask
  51.         // Use this mask to distinguish a type declaration as a Class, ValueType or Interface
  52.         ClassSemanticsMask = 32,
  53.         Class = 0,
  54.         // Type is a class.
  55.         Interface = 32,
  56.         // Type is an interface.
  57.         // Special semantics in addition to class semantics.
  58.         Abstract = 128,
  59.         // Class is abstract
  60.         Sealed = 256,
  61.         // Class is concrete and may not be extended
  62.         SpecialName = 1024,
  63.         // Class name is special. Name describes how.
  64.         // Implementation attributes.
  65.         Import = 4096,
  66.         // Class / interface is imported
  67.         Serializable = 8192,
  68.         // The class is Serializable.
  69.         // Use tdStringFormatMask to retrieve string information for native interop
  70.         StringFormatMask = 196608,
  71.         AnsiClass = 0,
  72.         // LPTSTR is interpreted as ANSI in this class
  73.         UnicodeClass = 65536,
  74.         // LPTSTR is interpreted as UNICODE
  75.         AutoClass = 131072,
  76.         // LPTSTR is interpreted automatically
  77.         CustomFormatClass = 196608,
  78.         // A non-standard encoding specified by CustomFormatMask
  79.         CustomFormatMask = 12582912,
  80.         // Use this mask to retrieve non-standard encoding information for native interop. The meaning of the values of these 2 bits is unspecified.
  81.         // end string format mask
  82.        
  83.         BeforeFieldInit = 1048576,
  84.         // Initialize the class any time before first static field access.
  85.         // Flags reserved for runtime use.
  86.         ReservedMask = 264192,
  87.         RTSpecialName = 2048,
  88.         // Runtime should check name encoding.
  89.         HasSecurity = 262144
  90.         // Class has security associate with it.
  91.     }
  92. }

Developer Fusion