O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 = 0,
   PrivateScope = 0,
   Private = 1,
   FamANDAssem = 2,
   Assembly = 3,
   Family = 4,
   FamORAssem = 5,
   Public = 6,
   MemberAccessMask = 7,
   UnmanagedExport = 8,
   Static = 16,
   Final = 32,
   Virtual = 64,
   HideBySig = 128,
   VtableLayoutMask = 256,
   NewSlot = 256,
   Abstract = 1024,
   SpecialName = 2048,
   RTSpecialName = 4096,
   PinvokeImpl = 8192,
   HasSecurity = 16384,
   RequireSecObject = 32768,
   ReservedMask = 53248
}

Hierarchy

System.ObjectSystem.ValueTypeSystem.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()}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required