Optimization.Set with ‘csc /optimize[+|-]’.In managed code, the JITter in the runtime does nearly all the optimization.The difference in generated IL from this flag is pretty small.The Whidbey C# compiler has more a difference on this flag than previous versions, but it’s still not much.

I don’t know of a way to ask what preprocessor flags were set for compiling a bit of code, but I would start my search by thinking about how they are applied at the file and assembly/netmodule scopes.