Have you guys seen this - C# Interpreter

Oct 7, 2010 at 8:27 AM

Review this post - http://amazedsaint.blogspot.com/2010/09/how-to-host-monos-csharp-compiler-in.html

Full Package - http://tirania.org/tmp/demo-repl.zip

Using the code in your application:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.CSharp;

namespace MonoCompilerHost
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(">Mini Console\n\n");
            while (true)
            {
                Console.Write(">");
                string input = Console.ReadLine();
                if (input == "@@") return;
                Evaluator.Run(input);
            }
        }
    }
}

Oct 25, 2010 at 1:44 PM
Edited Oct 25, 2010 at 1:45 PM

Thanks for posting this.  I looked at it after you posted and decided that Jint would still meet my needs better.  I like the type flexibility in Javascript better for what I'm doing (server-side scripting for a Web page), and it seems hard to pass parameters in to the Evaluator.  I can see other applications where the Evaluator would work better, though.

Nov 29, 2010 at 10:06 PM
mysterd429 wrote:

Thanks for posting this.  I looked at it after you posted and decided that Jint would still meet my needs better.  I like the type flexibility in Javascript better for what I'm doing (server-side scripting for a Web page), and it seems hard to pass parameters in to the Evaluator.  I can see other applications where the Evaluator would work better, though.

 Exactly!

I posted it for others to have other options.  We've integrated Jint into our framework, and love the results, but real C# will work better elsewhere.

Thanks for responding.