这是封装在我的dll中的类
public class CommClass
{
public SerialPort _port;
//
public CommClass(string _pname)
{
portList = SerialPort.GetPortNames();
_port = new SerialPort(portList[0]);
if (portList.Length < 1)
_port= null;
else
{
if(portList.Contains(_pname))
{
_port = new SerialPort(_pname);
//SerialPort _port = portList[0];
//return _port;
}
}
}
我知道有一个SerialDataReceived,如何将它封装到我的dll中?