Created
July 20, 2012 07:43
-
-
Save takekazuomi/3149339 to your computer and use it in GitHub Desktop.
Mono.CSharp sample code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="Mono.CSharp" version="4.0" targetFramework="net40-Client" /> | |
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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