cecil icon indicating copy to clipboard operation
cecil copied to clipboard

Make the Instruction constructor public

Open GregRos opened this issue 10 years ago • 1 comments

I find it rather annoying that the constructor Instruction (OpCode, object) isn't publicly visible. If you're not hand-coding additional instructions but getting them from another source (like another assembly), using the dedicated Instruction.Create methods that have strongly typed arguments and perform various checks just makes things needlessly difficult, forcing you to write complex switch statements to get around all the checks and signatures (in theory, of course; I just modified the source).

It's also kind of ill-fitting in a library that otherwise lets you do whatever you like.

GregRos avatar Aug 07 '15 09:08 GregRos

i have hit this one as well

SimonCropp avatar Aug 07 '15 09:08 SimonCropp