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

  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. ////////////////////////////////////////////////////////////////////////////////
  16. namespace System.Reflection
  17. {
  18.    
  19.     using System;
  20.     [Flags(), Serializable()]
  21.     [System.Runtime.InteropServices.ComVisible(true)]
  22.     public enum MethodAttributes
  23.     {
  24.         // NOTE: This Enum matchs the CorMethodAttr defined in CorHdr.h
  25.        
  26.         // member access mask - Use this mask to retrieve accessibility information.
  27.         MemberAccessMask = 7,
  28.         PrivateScope = 0,
  29.         // Member not referenceable.
  30.         Private = 1,
  31.         // Accessible only by the parent type.
  32.         FamANDAssem = 2,
  33.         // Accessible by sub-types only in this Assembly.
  34.         Assembly = 3,
  35.         // Accessibly by anyone in the Assembly.
  36.         Family = 4,
  37.         // Accessible only by type and sub-types.
  38.         FamORAssem = 5,
  39.         // Accessibly by sub-types anywhere, plus anyone in assembly.
  40.         Public = 6,
  41.         // Accessibly by anyone who has visibility to this scope.
  42.         // end member access mask
  43.         // method contract attributes.
  44.         Static = 16,
  45.         // Defined on type, else per instance.
  46.         Final = 32,
  47.         // Method may not be overridden.
  48.         Virtual = 64,
  49.         // Method virtual.
  50.         HideBySig = 128,
  51.         // Method hides by name+sig, else just by name.
  52.         CheckAccessOnOverride = 512,
  53.        
  54.         // vtable layout mask - Use this mask to retrieve vtable attributes.
  55.         VtableLayoutMask = 256,
  56.         ReuseSlot = 0,
  57.         // The default.
  58.         NewSlot = 256,
  59.         // Method always gets a new slot in the vtable.
  60.         // end vtable layout mask
  61.         // method implementation attributes.
  62.         Abstract = 1024,
  63.         // Method does not provide an implementation.
  64.         SpecialName = 2048,
  65.         // Method is special. Name describes how.
  66.         // interop attributes
  67.         PinvokeImpl = 8192,
  68.         // Implementation is forwarded through pinvoke.
  69.         UnmanagedExport = 8,
  70.         // Managed method exported via thunk to unmanaged code.
  71.         RTSpecialName = 4096,
  72.         // Runtime should check name encoding.
  73.         // Reserved flags for runtime use only.
  74.         ReservedMask = 53248,
  75.         HasSecurity = 16384,
  76.         // Method has security associate with it.
  77.         RequireSecObject = 32768
  78.         // Method calls another method containing security code.
  79.     }
  80. }

Developer Fusion