title: Writing String to Stream and reading it back does not work
body: <p>I want to write a String to a Stream (a MemoryStream in this case) and read the bytes one by one. </p>
  
  <pre><code>stringAsStream = new MemoryStream();
  UnicodeEncoding uniEncoding = new UnicodeEncoding();
  String message = "Message";
  
  stringAsStream.Write(uniEncoding.GetBytes(message), 0, message.Length);
  
  Console.WriteLine("This:\t\t" + (char)uniEncoding.GetBytes(message)[0]);
  Console.WriteLine("Differs from:\t" + (char)stringAsStream.ReadByte());
  </code></pre>
  
  <p>The (undesired) result I get is:</p>
  
  <pre><code>This:         M
  Differs from: ?
  </code></pre>
  
  <p>It <em>looks</em> like it's not being read correctly, as the first char of "Message" is 'M', which works when getting the bytes from the UnicodeEncoding instance but not when reading them back from the stream.</p>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <p>The bigger picture: I have an algorithm which will work on the bytes of a Stream, I'd like to be as general as possible and work with any Stream. I'd like to convert an ASCII-String into a MemoryStream, or maybe use another method to be able to work on the String as a Stream. The algorithm in question will work on the bytes of the Stream.</p>