locked
How to let the user write a func as a string and then compile it/run it on the fly? RRS feed

  • Question

  • Hi,

    How can I allow the user of my app to write a string which can be compiled to a func?

    For example, a method parameter requires: Func<string, bool> func, and I need to let the user write that func as a string (say in a console window), and then it can be run by the program.

    I have used the classes in Microsoft.CSharp to produce a compiler but I don't want the user to write anything. I will also need to get the results back. I can imagine many security risks with this, too.


    Thanks
    Friday, March 5, 2010 9:09 PM

Answers

All replies