The Code element allows you to create Process Variables and execute C# code directly in a Process. The Code element has two modes - one which declares a variable and assigns a value, and one that executes an expression.
If you chose to declare a variable and enter a variable name, the variable can be accessed with a #var. reference.
A Code variable declared in the root of a Process is accessible from child scopes and modification to it in the child scopes will be visible from the root. A Code variable declared in a child scope will not be accessible in the root.
If a Code element declares a variable, then the return value of the element will be the value of the variable.
A Code element that does not declare a variable will only return a String value indicating that it has been executed.
The Process has the following libraries referenced which can be utilized: mscorlib, System.Diagnostics, System.Dynamic, Microsoft.CSharp.RuntimeBinder, NewtonSoft.Json, System.Xml, System.Xml.Linq, System.Data and System.Linq
Type
You can define the type of the return value under "Show advanced settings" by typing the name of the type. Types introduced in aforementioned libraries, as well as built-in C# types are supported.