public static void Main()
Console.WriteLine("Hello World");
dynamic script = CSScript.LoadCode(
@"using System.Windows.Forms;
public void SayHello(string greeting)
MessageBox.Show(""Greeting: "" + greeting);
script.SayHello("Hello World!");
var product = CSScript.CreateFunc<int>(@"int Product(int a, int b)
int result = product(3, 4);
var SayHello = CSScript.LoadMethod(
@"using System.Windows.Forms;
public static void SayHello(string greeting)
MessageBoxSayHello(greeting);
ConsoleSayHello(greeting);
static void MessageBoxSayHello(string greeting)
MessageBox.Show(greeting);
static void ConsoleSayHello(string greeting)
Console.WriteLine(greeting);
.GetStaticMethod("*.SayHello" , "");
SayHello("Hello again!");