How can I disable compiler optimization in C#?
At the command line (csc), /optimize-
/optimize-
In the IDE, project properties → build → "optimize code"
For some JIT optimizations, you can use [MethodImpl(...)]
[MethodImpl(...)]