-
Notifications
You must be signed in to change notification settings - Fork 1
Interpreting C# scripts
winscripter edited this page Jan 9, 2024
·
1 revision
Use the Interpreter
class found in the DbgSharp
namespace to interpret C# scripts.
Default constructor. Takes no parameters.
Interprets the code. Previous classes, variables, methods, etc, also apply.
- Input code (type
String
)
Pretty much the same as Interpret(String). May not differ because the method itself is not asynchronous.
- Input code (type
String
)
var interpreter = new Interpreter();
interpreter.Interpret("int x = 45;");
interpreter.Interpret("System.Console.WriteLine(x);"); // outputs 45
interpreter.Interpret("x++;");
interpreter.Interpret("System.Console.WriteLine(x);"); // outputs 46