mercredi 1 juin 2016

Creating a method in a class created with Reflection in C#

I am creating a type with reflection by using the code from this answer. And I want to add a function to this class (probably using ILGenerator). And in the comment section of this answer, Sergey Mirvoda commented that ILGenerator emit commands can be obtained by simply following these steps: compile it into assembly and open with reflector, switch to IL view and you will see code that copypastable

I am using VS Ultimate 2013. Is there a way to do this with VS? Or do I need to use third party apps?





Aucun commentaire:

Enregistrer un commentaire