Tag Archives: compile C# code

Run user-entered code that modifies the program’s form in C#

The example Run user-entered code in C# shows how you can compile and execute code entered at run time. That example simply displays a message box and returns a DialogResult indicating which button the user pressed. This example shows how … Continue reading

Posted in algorithms, miscellany, programs, reflection | Tagged , , , , , , , , , , , , , , , , | Leave a comment

List languages that you can compile at runtime in C#

The example Run user-entered code in C# shows how to let the user enter C# code, compile at runtime, and execute the result, but how do you know what languages you can compile that way? You might guess C# and … Continue reading

Posted in algorithms, miscellany, programs, reflection | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

Run user-entered code in C#

This example shows how to compile and run user-entered code at run time. The form includes the following using statements. using System.CodeDom.Compiler; using System.Reflection; The following code executes when you click the Run button. // Compile and execute the code. … Continue reading

Posted in algorithms, miscellany, programs, reflection | Tagged , , , , , , , , , , , , , , , , | 12 Comments