I have a program i frequently use that is made with .NET. This program has a small bug that is very annoying and the developer to the app is nowhere to be found.
I have
I suggest you use the Reflexil plugin for Reflector. It allows you to easily modify assemblies, and even replace the body of a method by your own C# code.
I don't think there is an easier way to do this than what you already mentioned. I actually decompiled a program with ILDASM for something similar and it took quite a lot of tinkering.
If there is an easier method I'd like to know it too.
If the program is simple, in theory you could use reflector to reverse the entire program back to C#, make the change and recompile it.
Alternatively you could try a tool like ILDasm, which should allow you to extract the IL, make your change (in MSIL), and re assemble (using ILAsm). Obviously to do this you'll have to figure out how to write your change in IL, so you'll probably have to do some experimenting to see how if statements compile.
I suspect both will take quite a bit of messing around to get the recompile to work.
Good luck.
If you get it to work, post back and let me know, I'd be quite interested in how you did this.
You can use ILDASM and ILASM to make a roundtrip. While this is impractical for large changes, I think that it should do the trick in your case.
Try this .NET Reflector addin.
This has worked for me. It sometimes creates "Complier Generated" tags which cannot be complied. But you can easily fix this manually.
telerik Just Decompile (free) Then the reflexil plug in
2 min job with the above (I've tried all the other methods!!)