Using C# classes in Linx Expressions

In order to access classes from certain namespaces, we prepend #. to the fully qualified name of the class. The # would indicate that the following class name will be referenced as a C# class. Classes in the System and System.IO namespaces are made available. Please note that only static members and functions are available to use. No instances of a class can be created.

Example 1: Referencing the System.Math Class

  1. Drag on an Integer and open the Expression Editor
  2. Set the value to =#.System.Math.Abs(-500)
  3. Click OK
  4. Debug the function
    Result: 500

Example 2: Referencing the System.IO Class

  1. Drag on a Boolean and open the Expression Editor
  2. Set the value to =#.System.IO.File.Exists("C:\\temp\\log.txt")
  3. Create the file C:\Temp\log.txt
  4. Debug the function
    Result: true