andrew4582

ReadEntireStream

Dec 3rd, 2010
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. public static int ReadEntireStream(Stream oStream, byte[] arrBytes)
  2.         {
  3.             int offset = 0;
  4.             while (offset < arrBytes.LongLength)
  5.             {
  6.                 offset += oStream.Read(arrBytes, offset, arrBytes.Length - offset);
  7.             }
  8.             return offset;
  9.         }
Add Comment
Please, Sign In to add comment