PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection.​Method­Body Namespace / Method­Body­Element­Kind Enumeration

MethodBodyElementKind Enumeration

Enumeration of kinds of syntax elements (IMethodBodyElement).

Namespace:  PostSharp.Reflection.MethodBody
Assembly:  PostSharp (in PostSharp.dll) Version: (
public enum MethodBodyElementKind
  Member nameValueDescription
Add0 Addition (IBinaryExpression).
AddChecked1 Addition with overflow checking (IBinaryExpression).
And2 Bitwise And (IBinaryExpression).
ArrayIndex3 Element of an array (IBinaryExpression where Left is the array and Right is the index).
ArrayLength4 Length of an array (IUnaryExpression).
Assign5 Assignment (IBinaryExpression).
Goto6 Unconditional branch (IGotoExpression).
Variable7 Local variable expression (ILocalVariableExpression).
Conditional8 Conditional expression (IConditionalExpression).
Cast9 Cast (IUnaryExpression where ReturnType is the destination type).
Divide10 Division (IBinaryExpression).
LessThan11 Less than (IBinaryExpression).
LessThanOrEqual12 Less than or equal (IBinaryExpression).
Modulo13 Modulo (IBinaryExpression).
MultiplyChecked14 Multiply with overflow checking (IBinaryExpression).
Multiply15 Multiply (IBinaryExpression).
GreaterThan16 Greater than (IBinaryExpression).
GreaterThanOrEqual17 Greater than (IBinaryExpression).
Substract18 Substract (IBinaryExpression).
SubstractChecked19 Substract with overflow checking (IBinaryExpression).
Parameter20 Parameter (IParameterExpression).
This21 Current object (this keyword in C#, IZeroaryExpression).
AddressOf22 Referencing operator (& in C#, see IUnaryExpression).
Constant23 Constant (IConstantExpression).
Equal24 Equal (IBinaryExpression).
Not25 Logical negation (IUnaryExpression).
Different26 Different (IBinaryExpression).
ValueOf27 Dereferencing operator (* in C#, see IUnaryExpression).
Or28 Bitwise Or (IBinaryExpression).
Xor29 Bitwise And (IBinaryExpression).
ShiftLeft30 Bitwise shift to left (IBinaryExpression).
ShiftRight31 Bitwise shit to right (IBinaryExpression).
Negate32 Bitwise negation (IUnaryExpression).
SafeCast33 Safe cast (IUnaryExpression where ReturnType is the destination type).
Unbox34 Unbox (IUnaryExpression).
Throw35 Throw exception (IUnaryExpression).
Field36 Field (IFieldExpression).
Box37 Box (IUnaryExpression).
NewArray38 Create new array (INewArrayExpression).
TypedReferenceValue39 Get value of typed reference (IUnaryExpression).
CheckFinite40 Check that the value is finite (IUnaryExpression).
MakeTypedReference41 Make typed reference (IUnaryExpression).
ArgumentList42 Get argument list (IZeroaryExpression).
MethodPointer43 Get pointer of method (IMethodPointerExpression).
LocalAlloc44 Allocate on local stack (IUnaryExpression).
DefaultValue45 Default value for given type (IMetadataExpression).
CopyBuffer46 Copy buffer (ICopyBufferExpression).
InitBuffer47 Initialize buffer (IInitBufferExpression).
LoadToken48 Load metadata token (IMetadataExpression).
SizeOf49 Size of type (IMetadataExpression).
TypedReferenceType50 Get type of typed reference (IUnaryExpression).
ConvertChecked51 Convert to integral type with overflow check (IUnaryExpression).
Convert52 Convert to integral type (IUnaryExpression).
MethodCall53 Method call (IMethodCallExpression).
Return54 Return (IUnaryExpression).
NewObject55 Creates new object (INewObjectExpression).
Switch56 Switch (ISwitchExpression).
Block57 Instruction block (IBlockExpression).
CatchHandler58 Catch exception handler (IExceptionHandler).
FilterHandler59 Filter exception handler (IExceptionHandler).
FinallyHandler60 Finally exception handler (IExceptionHandler).
MethodBody61 Method body (IMethodBody).
LocalVariableDefinition62 Local variable definition (ILocalVariable).
Statement63 Statement (IStatementExpression).
See Also