Write commands to serial port from c# application

In one of my projects I needed to use a DEVICE which used serial port to communicate with any other application. Hence from my C# application I had to somehow send commands to that device in order to operate it.
Now that device used to run on COM Port i.e. Serial Port. Serial port understand commands in ascii format or byte arrays.
This particular device used to connect to serial port through ASCII Commands. Lets see how we can achieve this.

Continue reading