hi every one,
can u tel me please that how i can read the binary file till the end of file.......
can u tel me please that how i can read the binary file till the end of file.......
string filePath = //some file path
using(FileStream fs = new FileStream(filePath, FileMode.Open))
{
using(BinaryReader br = new BinaryReader(fs))
{
byte[] buffer = br.ReadBytes((int)br.BaseStream.Length);
}
}
using(FileStream fs = new FileStream(filePath, FileMode.Open))
{
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, fs.Length);
}
using(FileStream fs = new FileStream(filePath, FileMode.Open))
{
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, fs.Length);
}
Comment