Global serial

Hi, I am wondering how to declare or create a serial port so that it can be used by all classes and methods. Can this be done, and how?
Thanks

Public static SerialPort myser
or
public SerialPort myser

If it’s public, everything can see it :slight_smile:

Can you expand on exactly where to put this and how to define the port.

When you declare the property, you will declare it right after the class

class something
{
public SerialPort theserialport;
}

Please read the free ebook in the downloads section.

Eureka! I figured it out. Your pointer helped immensely.
Thanks

No problem!