Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# run c# code from string

using Microsoft.CodeAnalysis.CSharp.Scripting;
//you may need to import the namespace from NuGet packages
var now = CSharpScript.EvaluateAsync<string>("System.DateTime.Now.ToString()").Result;
 
PREVIOUS NEXT
Tagged: #run #code #string
ADD COMMENT
Topic
Name
7+6 =