title: Best datatype to return for XML serialized data
body: <p>I am creating a generic Android to C# tcp stack. On the C# side I would like to implement an interface called ITcpSerializable. </p>
  
  <p>The result of this serialization would then be sent over my tcp connection as raw xml.</p>
  
  <p>The current definition is as such.</p>
  
  <pre><code>public interface ITcpSerializable
  {
      StringBuilder Serialize();
  }
  </code></pre>
  
  <p>However what I am wondering is what is the best return type for a method like <code>Serialize()</code> when you expect that on some occasions the dataset may be rather large.</p>
  
  <p>It seems like there are so many alternatives for return types for such a method. Stream, textreader, xmldocument, perhaps even byte[] etc... What would be the best one?? </p>
  
  <p>PS: I realize this is somewhat subjective but am genuinely in need of some advice.</p>