Stream oStream = File.OpenRead(filename);
byte[] arrBytes=new byte[oStream.Length];
int offset = 0;
while (offset < arrBytes.LongLength)
{
offset += oStream.Read(arrBytes, offset, arrBytes.Length - offset);
}
byte[] arrBytes=new byte[oStream.Length];
int offset = 0;
while (offset < arrBytes.LongLength)
{
offset += oStream.Read(arrBytes, offset, arrBytes.Length - offset);
}