# Using C# classes in Linx Expressions

**URL:** https://community.linx.software/community/t/using-c-classes-in-linx-expressions/684
**Category:** How To
**Created:** [March 26, 2024, 10:13am UTC](https://community.linx.software/community/t/using-c-classes-in-linx-expressions/684 "2024-03-26T10:13:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shamima](https://community.linx.software/community/user_avatar/community.linx.software/shamima/32/1494_2.png) [@shamima](https://community.linx.software/community/u/shamima)
#### Post date: [March 26, 2024, 10:13am UTC](https://community.linx.software/community/t/using-c-classes-in-linx-expressions/684/1 "2024-03-26T10:13:21Z")

</div>

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`

---

<div class="post-metadata">

### Author: ![shamima](https://community.linx.software/community/user_avatar/community.linx.software/shamima/32/1494_2.png) [@shamima](https://community.linx.software/community/u/shamima)
#### Post date: [March 26, 2024, 10:13am UTC](https://community.linx.software/community/t/using-c-classes-in-linx-expressions/684/2 "2024-03-26T10:13:27Z")

</div>



---

<div class="post-metadata">

### Author: ![shamima](https://community.linx.software/community/user_avatar/community.linx.software/shamima/32/1494_2.png) [@shamima](https://community.linx.software/community/u/shamima)
#### Post date: [March 26, 2024, 10:33am UTC](https://community.linx.software/community/t/using-c-classes-in-linx-expressions/684/3 "2024-03-26T10:33:23Z")

</div>


