PERWAPI.CILInstructions.ReplaceInstruction C# (CSharp) Method

ReplaceInstruction() public method

Replace a single IL instruction at position pos in the buffer with some new instruction(s). This removes the instruction and puts the instruction buffer into "insert" mode at the position of the removed instruction. EndInsert must be called to insert the new instructions. This method cannot be called when in "insert" mode.
public ReplaceInstruction ( int pos ) : void
pos int position of the instruction to be replaced
return void
        public void ReplaceInstruction(int pos)
        {
            if (inserting) throw new Exception("Cannot replace instructions during insert.");
            currI = pos;
            if ((pos > 0) || (pos < tide)) {
                numReplace = 1;
                StartInsert();
            }
        }

Same methods

CILInstructions::ReplaceInstruction ( int from, int to ) : void