public void onReceive(byte commId, byte terId, byte zoneId, byte alarmType){//将参数打包byte[] bytes = new byte[]{ commId,terId,zoneId,alarmType};Thread t = new Thread(new ParameterizedThreadStart(onReceiveReal));t.Start(bytes);}//重载要执行的方法private void onReceiveReal(object o){byte[] a = new byte[4];a = (byte[])o;onReceiveReal(a[0],a[1],a[2],a[3]);}private void onReceiveReal(byte commId, byte terId, byte zoneId, byte alarmType){}
C#线程中执行多个参数的方法
未经允许不得转载:爱站程序员基地 » C#线程中执行多个参数的方法
爱站程序员基地
![(原创)[C#] 一步一步自定义拖拽(Drag&Drop)时的鼠标效果:(一)基本原理及基本实现-爱站程序员基地](https://aiznh.com/wp-content/uploads/2022/07/20220721231016-62d9dcd85c40b-220x150.gif)

