Skip to content

Instantly share code, notes, and snippets.

@JoshVarty
Created October 16, 2015 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshVarty/8f99175eb824664a11ec to your computer and use it in GitHub Desktop.
Save JoshVarty/8f99175eb824664a11ec to your computer and use it in GitHub Desktop.
var state = CSharpScript.RunAsync(@"int x = 5; int y = 3; int z = x + y;""");
ScriptVariable x = state.Variables["x"];
ScriptVariable y = state.Variables["y"];
Console.Write($"{x.Name} : {x.Value} : {x.Type} "); // x : 5
Console.Write($"{y.Name} : {y.Value} : {y.Type} "); // y : 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment