src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// 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.
/// </summary>
/// <param name="pos">position of the instruction to be replaced</param>
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.
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 void ReplaceInstruction(int pos) {
            if (inserting) throw new Exception("Cannot replace instructions during insert.");
            currI = pos;
            if ((pos > 0) || (pos < tide)) {
                numReplace = 1;
                StartInsert();
            }
        }
public void ReplaceInstruction ( int pos ) { if ( inserting ) throw new Exception ( " " ) ; currI = pos ; if ( ( pos > 0 ) || ( pos < tide ) ) { numReplace = 1 ; StartInsert ( ) ; } }
Replace a single IL instruction at position pos in the buffer
with some new instruction(s).
Replace a single IL instruction at position pos in the buffer with some new instruction ( s ) .
pos
int
position of the instruction to be replaced
position of the instruction to be replaced