System.IO.FileInfo fi = new System.IO.FileInfo(FileName);
if (fi.Exists)
{
FileInfo fInfo = new FileInfo(FileName);
long numBytes = fInfo.Length;
FileStream fStream = new FileStream(FileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fStream);
byte[] data = br.ReadBytes((int)numBytes);
// Show the number of bytes in the array.
//Label1.Text = Convert.ToString(data.Length);
br.Close();
fStream.Close();
}
Tuesday, May 26, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment