Advertisement
Guest User

Untitled

a guest
Oct 16th, 2014
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1.     public int ReadUnsignedShort()
  2.     {
  3.         int ch1 = ClientInput.Read();
  4.         int ch2 = ClientInput.Read();
  5.         if ((ch1 | ch2) < 0)
  6.         {
  7.             throw new EndOfStreamException();
  8.         }
  9.         return (ch1 << 8) + (ch2 << 0);
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement