hi,
First, you must use the System.IO.Ports namespace, to be able to access serial port objects.
You can create a serial port object using the following:
SerialPort myPort = new SerialPort( ); //other constructors are available according to your needs
then initialise the port properties, like:
myPort.PortName = "COM1";
myPort.BaudRate = 9600;
myPort.StopBits = StopBits.None;
...
you also have access to other properties like the read/write buffer size, read/write timeout ....
Afterwards, you open the port, using:
myPort.Open( );
Do not forget to close it at the end.
To read data you can use the:
myPort.ReadLine( ), ReadExisting( ), Read( ) and many other functions as well.
Hope this helps