c# - Return string from Main() with CSharpCodeProvider -


i'm trying compile c# code(nothing complex, main() ) using csharpcodeprovider. code returns string, can't understand how pass value function. possible?

public string execute(list<string> code, list<string> _referencedassemblies)     {         compilerparameters cp = new compilerparameters();         (int = 0; < _referencedassemblies.count; i++) {             cp.referencedassemblies.add(_referencedassemblies[i]);         }          stringbuilder sb = new stringbuilder();         (int = 0; < code.count; i++) {             sb.append(code[i]);         }           csharpcodeprovider provider = new csharpcodeprovider();         compilerresults result = provider.compileassemblyfromsource(cp, sb.tostring()); 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -