Skip to content

Instantly share code, notes, and snippets.

@takekazuomi
Created July 20, 2012 07:43
Show Gist options
  • Save takekazuomi/3149339 to your computer and use it in GitHub Desktop.
Save takekazuomi/3149339 to your computer and use it in GitHub Desktop.
Mono.CSharp sample code
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.CSharp" version="4.0" targetFramework="net40-Client" />
</packages>
using Mono.CSharp;
namespace ConsoleApplication5 {
class Program {
void Run() {
var settings = new CompilerSettings ();
var evaluator = new Evaluator(settings, new Report(new ConsoleReportPrinter()));
evaluator.Run(@"System.Console.WriteLine(""Hello"");");
}
static void Main(string[] args) {
var p = new Program();
p.Run();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment