damongant

Untitled

Apr 20th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. string ReadBsonCstring()
  2. {
  3. using (MemoryStream memStream = new MemoryStream(128))
  4. {
  5. while (true)
  6. {
  7. byte b = ReadByte();
  8. if (b == 0x00)
  9. break;
  10. memStream.WriteByte(b);
  11. }
  12. return Encoding.UTF8.GetString(memStream.ToArray());
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment