Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

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 (or Me) 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.Object System.ValueType System.Enum(System.IComparable, System.IFormattable, System.IConvertible) CallingConventions

Returned By

MethodBase.CallingConvention

Passed To

Multiple types

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

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

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard

Publisher Resources

ISBN: 0596005261Catalog PageErrata