如何让这个工作起来.... 我试图将事件处理程序传递给处理回调的函数。 .............主要例程............
ConnectPorts(DataReceivedHandlerFREQ_FL );
......................................
.............函数被调用来设置事件处理程序..........
static void ConnectPort(???? DataReceivedHandlerFREQ_FL)
{
SerialPort FLfreqPort = new SerialPort(MyGlobals.ComPortFLFQ, 153600);
FLfreqPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandlerFREQ_FL);
}
............................................... ................
..........................处理程序在这里定义................ ........
private static void DataReceivedHandlerRFID_FL(object sender, SerialDataReceivedEventArgs e)
{
DataReceivedHandlerRFID(sender, e, 0);
}