CSharpFunction

CSharpFunction can contain any C# function's code that you want to include in your solution.

Properties

Function

The function definition to execute. Click on the [...] icon to open the Function Editor.

An example function is included as a reference. You can replace this with your own function.

When writing a new function, please note that any access modifiers (e.g. public or private) will be ignored, so it is not necessary to add them. The name of the function is also not important (and independent of the name of the Linx function), although it may help to specify a descriptive name to convey the purpose of the function.

Parameters will be extracted and listed in the Parameters section, while the result of the function (if any) will be used as the output of your Linx function.

Parameters

In this section you can assign values to the parameters that are defined in your function. The list of parameters will automatically update when changes are made to the function.

Example

The example function in the Function Editor returns "Hello [name]!".

CSharpFunction

When you save the function definition in the Function Editor, the name parameter is created in the Parameters section. Enter or select any value for the name parameter, e.g. "Jane". When you run the function, "Hello Jane!" will be returned.

The function's output will be available for use by other functions, e.g. SetValue. Expanding on our example, the target String in the screenshot below will be set to "Hello Jane!".

CSharpFunction

Writing C# in Linx