icsharpcode/ILSpy — pull request #309 by jbevain (2012-01-22 20:46:53+00:00)
Title: Mcs generated switch on string

mcs generates a field inside the class containing the switch on string, where csc injects it in .

So I first modified the step to not do this check.

Then the difference was that ILSpy was recovering a collection initializer for the jump table for the mcs generated code, and not for csc. This was because csc emits calls to Add using the `call` opcode instead of `callvirt`, preventing ILSpy to recover the initializer. I adjusted the check.

Last, I made sure that both patterns could be recovered.