首页 > 代码库 > Array.Copy

Array.Copy

var bt = new byte[] { 0x03, 0x00, 0x01, 0xD9, 0x23 };               var result = new byte[] { 0x01, 0x00, 0x03, 0x00, 0xFC };               var tmp = new byte[5];               _sp.Write(bt, 0, bt.Length);               Thread.Sleep(500);               var recive = new byte[_sp.BytesToRead];               _sp.Read(recive, 0, _sp.BytesToRead);               Array.Copy(recive, 6, tmp, 0, 5);               return CompareArray(tmp, result);