//第二步:编写委托方法 private byte[] GetData(ModTCP modTCP) { try { return(modTCP.ReadKeepReg(0, 8)); } catch (Exception) { return(null); } }
public Form1() { InitializeComponent(); modTCP = new ModTCP(); }