Is it possible to create/execute code in run-time in C#?
问题 I know you can dynamically create a .NET assembly using Emit, System.Reflection and manually created IL code as shown here. But I was wondering is it possible to dynamically create and execute C# code block real-time, in a running application. Thanks for any input or ideas. Edit: As I understand CodeDOM allows you to compile C# code into EXE file rather than "just" executing it. Here's some background information and why (as far as I can tell) this isn't the best option for me. I'm creating