New Element in frends 5.2
This Element should only be used if the developer is proficient in programming and C#. Especially if the code gets duplicated into multiple different Processes or is starting to get complicated, it is recommended to create a Task instead.
The C# Statement Element functions in the same way as the C# Code Element, except it is possible to write multiple lines of code.
If 'Assign variable' is set, all execution paths in the code need to end in a return or throw.
Advanced usage:
In some cases, there is a need for a re-usable function in a Process that is small and simple enough not to be worth creating a one-off Task for.
In this case, the C# Code Element can return a Func. This re-usable function can be called later in the Process multiple times with different parameters.
To be able to call the function, 'Assign variable' needs to be set.
This piece of code can now be executed in the Process later by using #var.upperCase("foo"), giving the result "FOO".