对序列应用累加器函数。 /// <summary> /// 计算校验和,SUM /// </summary> public byte CalculateCheckSum(byte[] data) { int sum = data.Aggregate(, (current, t) => current + t); return (byte)(sum & 0x00ff); }