csharp run csharp code from string

Code Example - csharp run csharp 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;