Skip to main content

Run C# code

Run C# statements (the body of a method that gets args and returns a value); compiled by the .NET Framework on Windows.

Command in the .NET, Java and COM toolkit · id ooa.dotnet/run_csharp · 7 inputs (1 required), 3 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
CodeStringYesC# statements; args is an IDictionary<string, object> of the arguments; return a value.
ArgumentsDictionaryNoValues the code reads as args["name"].
UsingsStringNoExtra namespaces, one per line (System, Collections.Generic, Linq, Text and IO are there).
MembersStringNoOther methods or fields of the same static class, for code used more than once.
ReferencesListNoAssemblies the code needs beyond the usual ones: names such as System.Xml, or DLL paths.
Timeout (seconds)NumberNo120Stop the call after this many seconds.
Fail on errorBooleanNotrueFail the step when the code throws; when off, the error goes to 'error' and the run goes on.

Outputs​

OutputTypeWhat it is
resultAnyWhat the code returns (text, numbers, true/false, lists and dictionaries; other objects as text).
outputStringWhat the code wrote with Console.WriteLine.
errorStringThe exception, when fail on error is off.