Skip to content

RainsSoft/MonoCompilerAsAService

 
 

Repository files navigation

MonoCompilerAsAService is just the Mono 2.10 C# compiler as a small project.
This project is based on Frank A. Krueger's work porting this compiler to Silverlight. Try it out at: runcsharp.com.

Usage

_Compiler = new Runner();
Console.WriteLine(_Compiler.Execute("Math.Abs(-42);"));
Console.WriteLine(_Compiler.Execute("Math.Sin(Math.PI / 6);"));
Console.WriteLine(_Compiler.Execute("class Fact { public int Run(int n) { return n <= 0 ? 1 : n*Run(n-1); } }"));
Console.WriteLine(_Compiler.Execute("new Fact().Run(5);"));
Console.WriteLine(_Compiler.Execute("\"abcdefgh\".Substring(1, 2);"));
Console.WriteLine(_Compiler.Execute("var str = \"Hello World!\";"));
Console.WriteLine(_Compiler.Execute("Print (str);"));

CSharpShell

You can also use a nice interactive CSharpShell based on Mono's read-eval-print loop...

CSharpShell screenshot

License

Just praise the Mono crew. I did nothing... But anyway MonoCompilerAsAService is released under the Apache License 2.0. For details see the LICENSE file. To suggest a feature, report a bug or general discussion: http://github.com/ahzf/MonoCompilerAsAService/issues
If you want to help or contribute source code to this project, please use the same license.

Acknowledgments

Please read the NOTICE file for further credits.

About

Mono 2.10 C# 4.0 compiler as a service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%