public static void WriteString(string wString) { if (writeStringAmount == 0) { writeStringIndex = curWriteIndex; curWriteIndex += sizeof(byte); } writeStringAmount += 1; wbytes[writeStringIndex] = (byte)writeStringAmount; byte[] strBuffs = ByteConvert.StringToMsgBytes(wString); strBuffs.CopyTo(wbytes, curWriteIndex); curWriteIndex += strBuffs.Length; }