แก้ไข

แชร์ผ่าน


OpCode.EvaluationStackDelta Property

Definition

Gets the value of how the IL instruction changes the evaluation stack.

public:
 property int EvaluationStackDelta { int get(); };
public int EvaluationStackDelta { get; }
member this.EvaluationStackDelta : int
Public ReadOnly Property EvaluationStackDelta As Integer

Property Value

Remarks

The difference between how many elements are popped from the stack and how many are pushed onto the stack as a result of the IL instruction.

For some IL instructions like Call stack change is not fixed and depends on the called reference signature.

For such OpCodes the EvaluationStackDelta returns 0. In this case you should not rely on

EvaluationStackDelta for calculating stack size and/or max stack, instead need to evaluate the reference signature.

For example, in case the instruction is calling a method reference, you need to evaluate the method signature;

the push count depends on the returning value, the pop count depends on how many parameters passed.

Applies to