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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Code | String | Yes | C# statements; args is an IDictionary<string, object> of the arguments; return a value. | |
| Arguments | Dictionary | No | Values the code reads as args["name"]. | |
| Usings | String | No | Extra namespaces, one per line (System, Collections.Generic, Linq, Text and IO are there). | |
| Members | String | No | Other methods or fields of the same static class, for code used more than once. | |
| References | List | No | Assemblies the code needs beyond the usual ones: names such as System.Xml, or DLL paths. | |
| Timeout (seconds) | Number | No | 120 | Stop the call after this many seconds. |
| Fail on error | Boolean | No | true | Fail the step when the code throws; when off, the error goes to 'error' and the run goes on. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Any | What the code returns (text, numbers, true/false, lists and dictionaries; other objects as text). |
| output | String | What the code wrote with Console.WriteLine. |
| error | String | The exception, when fail on error is off. |