1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 namespace System.Reflection
6 {
7     [Flags]
8     public enum MethodAttributes
9     {
10         // NOTE: This Enum matchs the CorMethodAttr defined in CorHdr.h
11 
12         // member access mask - Use this mask to retrieve accessibility information.
13         MemberAccessMask = 0x0007,
14         PrivateScope = 0x0000,     // Member not referenceable.
15         Private = 0x0001,     // Accessible only by the parent type.
16         FamANDAssem = 0x0002,     // Accessible by sub-types only in this Assembly.
17         Assembly = 0x0003,     // Accessibly by anyone in the Assembly.
18         Family = 0x0004,     // Accessible only by type and sub-types.
19         FamORAssem = 0x0005,     // Accessibly by sub-types anywhere, plus anyone in assembly.
20         Public = 0x0006,     // Accessibly by anyone who has visibility to this scope.
21                              // end member access mask
22 
23         // method contract attributes.
24         Static = 0x0010,     // Defined on type, else per instance.
25         Final = 0x0020,     // Method may not be overridden.
26         Virtual = 0x0040,     // Method virtual.
27         HideBySig = 0x0080,     // Method hides by name+sig, else just by name.
28         CheckAccessOnOverride = 0x0200,
29 
30         // vtable layout mask - Use this mask to retrieve vtable attributes.
31         VtableLayoutMask = 0x0100,
32         ReuseSlot = 0x0000,     // The default.
33         NewSlot = 0x0100,     // Method always gets a new slot in the vtable.
34                               // end vtable layout mask
35 
36         // method implementation attributes.
37         Abstract = 0x0400,     // Method does not provide an implementation.
38         SpecialName = 0x0800,     // Method is special.  Name describes how.
39 
40         // interop attributes
41         PinvokeImpl = 0x2000,     // Implementation is forwarded through pinvoke.
42         UnmanagedExport = 0x0008,     // Managed method exported via thunk to unmanaged code.
43         RTSpecialName = 0x1000,     // Runtime should check name encoding.
44 
45         HasSecurity = 0x4000,     // Method has security associate with it.
46         RequireSecObject = 0x8000,     // Method calls another method containing security code.
47 
48         ReservedMask = 0xd000,
49     }
50 }
51