I am using using class System.IO.Ports. In some cases this component still runs even when the program is closed. As a result I can not open the new serial port with the same port name, cause it is already opened.
Please, is there any way how to dispose System.IO.Ports in c#?
You're looking for the cunningly-named Dispose
method.