I managed to create a class using CodeDom and add a single method to that class. Now, is there a way to, having constructed the CodeCompileUnit instance, compile the code and invoke the generated method? The method invocation has to be done in the same context as the code generation.
Share
Taken from a friend of mine’s blog:
You can then use reflection on the types to create an instance of the type you want and execute whatever method you want.