private static string UID = "XYZ"; // Change XYZ to the UID of your LCD 16x2 Bricklet

    #endregion Fields

    #region Methods

    static void Main()
    {
        IPConnection ipcon = new IPConnection(); // Create IP connection
        BrickletLCD16x2 lcd = new BrickletLCD16x2(UID, ipcon); // Create device object

        ipcon.Connect(HOST, PORT); // Connect to brickd
        // Don't use device before ipcon is connected

        // Turn backlight on
        lcd.BacklightOn();

        // Write "Hello World"
        lcd.WriteLine(0, 0, "Hello World");

        Console.WriteLine("Press enter to exit");
        Console.ReadLine();
        ipcon.Disconnect();
    }
    static void Main()
    {
        IPConnection ipcon = new IPConnection(); // Create IP connection
        BrickletLCD16x2 lcd = new BrickletLCD16x2(UID, ipcon); // Create device object

        ipcon.Connect(HOST, PORT); // Connect to brickd
        // Don't use device before ipcon is connected

        // Register button pressed callback to function ButtonPressedCB
        lcd.ButtonPressed += ButtonPressedCB;

        // Register button released callback to function ButtonReleasedCB
        lcd.ButtonReleased += ButtonReleasedCB;

        Console.WriteLine("Press enter to exit");
        Console.ReadLine();
        ipcon.Disconnect();
    }
    private static string UID = "XYZ"; // Change XYZ to the UID of your LCD 16x2 Bricklet

    #endregion Fields

    #region Methods

    static void Main()
    {
        IPConnection ipcon = new IPConnection(); // Create IP connection
        BrickletLCD16x2 lcd = new BrickletLCD16x2(UID, ipcon); // Create device object

        ipcon.Connect(HOST, PORT); // Connect to brickd
        // Don't use device before ipcon is connected

        // Turn backlight on
        lcd.BacklightOn();

        // Write a string using the UTF16ToKS0066U function to map to the LCD charset
        lcd.WriteLine(0, 0, UTF16ToKS0066U("Stromstärke: 5µA"));

        // Write a string directly including characters from the LCD charset
        lcd.WriteLine(1, 0, "Drehzahl: 1000s\xe9");

        Console.WriteLine("Press enter to exit");
        Console.ReadLine();
        ipcon.Disconnect();
    }
 // Callback function for button released callback
 static void ButtonReleasedCB(BrickletLCD16x2 sender, byte button)
 {
     Console.WriteLine("Button Released: " + button);
 }