damongant

Untitled

Apr 20th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. string ReadBsonString()
  2. {
  3. var length = ReadInt32();
  4. var value = Encoding.UTF8.GetString(ReadBytes(length - 1));
  5. if (Read() != 0x00)
  6. throw new Exception("ReadBsonString - no nullterminator - corrupt data?");
  7. return value;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment