tags:

views:

27

answers:

1

How does the short circuit evaluation work in the msil interpreter? Does the And instruction contain information about where to jump to if false, and same for the Or with true?

+2  A: 

No - the IL instructions for And and Or actually perform bitwise operations on the top two operands on the stack. If a high level language uses short circuit evaluation, it is compiled down to explicit branching operations at the IL level and doesn't rely on the And instruction at all. Use a tool like Reflector to see the actual IL produced by the compiler in question.

kvb