CSharp runtime code generator
If you need to execute C# in runtime environnement, i suggest you to take a look to this library : http://www.csscript.net/ .
Add the DLL to your project and now, just type this kind of code :
dynamic script = CSScript.LoadCode(@"namespace GenerationScript {
using System;
using System.Windows.Forms;
public class Script
{
public void ExecuteCode()
{" +
code +
"}" +
"}" +
"}").CreateObject("*");
// execute runtime code
script.ExecuteCode();
Your project need to run under framework .NET 4.0 or more.
Written by ElGrandePipo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C#
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#