public static string[] GetPortNames();
public SerialPort(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits);
public bool IsOpen { get; }
public void Open();
public void Close();
public void Write(byte[] buffer, int offset, int count);
public void Write(string text);
public void Write(char[] buffer, int offset, int count);
public void WriteLine(string text);
public int Read(byte[] buffer, int offset, int count);
public string ReadExisting();
public int Read(char[] buffer, int offset, int count);
public int ReadByte();
public int ReadChar();
public string ReadLine();
public int ReadTimeout { get; set; }
public int WriteTimeout { get; set; }
public int ReceivedBytesThreshold { get; set; }
public void DiscardInBuffer();
public void DiscardOutBuffer();
public event SerialDataReceivedEventHandler DataReceived;
原文:https://www.cnblogs.com/LiuwayLi/p/15206956.html