Beispiel #1
0
 public override void Serialize(MemoryStream stream)
 {
     layout.Serialize(stream);
     System.Byte[] data_bytes     = data.ToArray();
     System.Byte[] data_len_bytes = BitConverter.GetBytes((System.UInt32)data_bytes.Length);
     stream.Write(data_len_bytes, 0, data_len_bytes.Length);
     stream.Write(data_bytes, 0, data_bytes.Length);
 }
 public override void Serialize(MemoryStream stream)
 {
     layout.Serialize(stream);
     System.Byte[] data_len_bytes = BitConverter.GetBytes((System.UInt32)data.Count);
     stream.Write(data_len_bytes, 0, data_len_bytes.Length);
     foreach (System.Int32 element in data)
     {
         System.Byte[] element_bytes = BitConverter.GetBytes(element);
         stream.Write(element_bytes, 0, element_bytes.Length);
     }
 }