title: protobuf-net: Serializing an empty List
body: <p>we have some problems with serializing an empty list.
  here some code in .NET using CF 2.0</p>
  
  <pre><code>//Generating the protobuf-msg
  ProtoBufMessage msg = new ProtoBufMessage();
  msg.list = new List&lt;AnotherProtobufMessage&gt;();
  // Serializing and sending throw HTTP-POST
  MemoryStream stream = new MemoryStream();
  Serializer.Serialize(stream, msg);
  byte[] bytes = stream.ToArray();
  HttpWebRequest request = createRequest();
  request.ContentLength = bytes.Length ;
  
  using (Stream httpStream = request.GetRequestStream())
  {              
        httpStream.Write(bytes, 0, bytes.Length);
  }
  </code></pre>
  
  <p>we got a exception, when we try to write on the stream (bytes.length out of range).
  But a type with an empty List should not be 0 bytes, right (type-information?)?</p>
  
  <p>We need this type of sending, because in the Response are the messages from the Server for our client.</p>