I'm going through MSIL and noticing there are a lot of nop instructions in the MSIL.
The MSDN article says they take no action and are used to fill space if the opcode is patched. They're used a lot more in debug builds than release builds.
I know that these kinds of statements are used in assembly languages to align later instructions, but why are MSIL nops needed in MSIL?
(Editor's note: the accepted answer is about machine-code NOPs, not MSIL/CIL NOPs which the question originally asked about.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…