this is the class encapsulated in my 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;
}
}
}
i knew there is a SerialDataReceived ,how to encapsulate it into my dll?