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

CallingConventions

Synopsis

Calling conventions are the rules that govern the semantics of how method arguments and return values are passed. They also specify which registers to use, and designate what this method does with the stack. The following list describes each enumeration member:

Standard

Designates the default CLR conventions.

VarArgs

Allows variable arguments.

Any

Allows either convention.

HasThis

Passes the target method the this reference as the first argument and cannot be used for static methods.

ExplicitThis

Represents a call to a nonstatic method and is a function pointer (for delegates). If ExplicitThis is set, HasThis must also be set.

public enum CallingConventions {
   Standard = 0x00000001,
   VarArgs = 0x00000002,
   Any = 0x00000003,
   HasThis = 0x00000020,
   ExplicitThis = 0x00000040
}

Hierarchy

System.ObjectSystem.ValueTypeSystem.Enum(System.IComparable, System.IFormattable, System.IConvertible)CallingConventions

Returned By

MethodBase.CallingConvention

Passed To

Multiple types

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