![Serial Port Communication Asp Net](https://kumkoniak.com/78.jpg)
As with all application I create, I keep functionality separated from presentation, I do this by creating Manager classes that manage the functionality for a given process.
![Serial Port Communication Asp Net Serial Port Communication Asp Net](https://www.automationmag.com/wp-content/uploads/2019/09/a62ef80ea0e7f578a290981dae80dafa.jpg)
Now that we have that out of the way, lets move on to programming our application. This allows you to retrieve a list of available ports (COM1,COM2,etc.) available for the computer the application is running on.
![Serial Port Communication Asp Net Serial Port Communication Asp Net](https://bermoorganic.weebly.com/uploads/1/2/7/6/127644333/121991379.png)
One of the most useful methods in the SerialPort class is the GetPortNames Method. DotNet developers finally had an intrinsic way of serial port communication, without having to deal with the complexities of interoping with an old legacy ActiveX OCX control. Net 2.0, and this time Microsoft added the System.IO.Ports Namespace, and within that was the SerialPort Class. Worse yet, C# developers had to rely on a Visual Basic control and Namespace if they wanted to communicate via serial port. It was soon discovered that, with all it's OO abilities, the ability to communicate via a serial port wasn't available, so once again VB developers were forced to rely on the MSComm Control from previous versions of Visual Basic, still not that big of a deal, but some were upset that an intrinsic way of serial port communication wasn't offered with the. Net 1.1, VB programmers loved the fact that Visual Basic had finally evolved to an OO language. The control did exactly what was needed for the task. Back in the days of Visual Basic 6.0, you had to use the MSComm Control that was shipped with VB6, the only problem with this method was you needed to make sure you included that control in your installation package, not really that big of a deal. Lately Ive seen a lot of questions on how to send and receive data through a serial port, so I thought it was time to write on the topic. Welcome to my tutorial on Serial Port Communication in C#.
![Serial Port Communication Asp Net](https://kumkoniak.com/78.jpg)