Nothing is built into the current version of .NET, which allows this. However, the Roslyn project aims to incorporate scenarios such as this. They have a CTP out .
A simple example: (from the blog of Kirill Osenkov ):
[TestMethod] public void SimpleEvaluationUsingScriptEngine() { ScriptEngine engine = new ScriptEngine(); int result = engine.Execute<int>("1 + 2"); Assert.AreEqual(3, result); }
driis source share