You can use SerialPort from System.IO.Ports.SerialPort
It is available as a form component in the toolbar in the toolbar → Components → SerialPort
In the properties you can choose which COM port you want to connect to
Since your question is about a stream object, I think you can use SerialPort.BaseStream and pass it to StreamWriter / StreamReader
source
share