ScriptRuntime has an IO property that returns a ScriptIO object. You can call SetOutput and redirect the output. As already mentioned, there is also Console.SetOut, which you might want to call, calls the user directly calls Console.WriteLine. It's nice to use ScriptIO, although you can have multiple scripts in different ScriptRuntime scripts for different outputs.
source share