c# - How to write and compile "on the fly" -
this question has answer here:
i wish able write code running program compile , implement code when hit send code button on ui.
for example:
if type:
messagebox.show("hello world"); and hit send, pop saying hello world.
i have searched , searched ways can't working.
can recommend way this?
you use csharpcodeprovider older technology , outdated.
the latest project microsoft toying roslyn, it's in ctp , exposes compiler , analysis systems used microsoft , vstudio etc when building c# , vb.net apps.
here's link on how use built in scripting engine.
http://visualstudiomagazine.com/articles/2011/11/16/the-roslyn-scripting-api.aspx
Comments
Post a Comment