Name
MethodAttributes
Synopsis
These attributes can be placed on
methods. The behavior of most of these is
obvious and the same as for FieldAttributes
. The
others are used for specifying the structure of the object
vTable
.
public enum MethodAttributes { ReuseSlot = 0x00000000, PrivateScope = 0x00000000, Private = 0x00000001, FamANDAssem = 0x00000002, Assembly = 0x00000003, Family = 0x00000004, FamORAssem = 0x00000005, Public = 0x00000006, MemberAccessMask = 0x00000007, UnmanagedExport = 0x00000008, Static = 0x00000010, Final = 0x00000020, Virtual = 0x00000040, HideBySig = 0x00000080, NewSlot = 0x00000100, VtableLayoutMask = 0x00000100, CheckAccessOnOverride = 0x00000200, Abstract = 0x00000400, SpecialName = 0x00000800, RTSpecialName = 0x00001000, PinvokeImpl = 0x00002000, HasSecurity = 0x00004000, RequireSecObject = 0x00008000, ReservedMask = 0x0000D000 }
Hierarchy
System.Object
→
System.ValueType
→
System.Enum(System.IComparable
,
System.IFormattable
, System.IConvertible)
→
MethodAttributes
Returned By
MethodBase.Attributes
Passed To
System.Reflection.Emit.ModuleBuilder.{DefineGlobalMethod( )
, DefinePInvokeMethod( )}
,
System.Reflection.Emit.TypeBuilder.{DefineConstructor( )
, DefineDefaultConstructor( )
,
DefineMethod( )
, DefinePInvokeMethod( )}
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.