Closes the port connection, sets the IsOpen property to false, and disposes of the internal Stream object.
public procedure Close;
Calling this method closes the SerialPort object and clears both the receive and transmit buffers.