Created
May 11, 2020 13:29
-
-
Save MikeCodesDotNET/b900f7d5f7cd53bd3afdc1ead6d68285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async Task Main(string[] args) | |
{ | |
var userScriptPath = Path.Combine(Environment.CurrentDirectory, "scriptInput.txt"); | |
var fileContents = File.ReadAllText(userScriptPath); | |
Script script = CSharpScript.Create(fileContents, ScriptOptions.Default); | |
var result = await script.RunAsync(); | |
Console.WriteLine($"Seconds in a week: {result.GetVariable("seconds").Value}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment