OpenFileDialog f = new OpenFileDialog(); f.ShowDialog(); if (f.FileName != null && f.FileName != "") { string filePath = f.FileName; string connectionString = Program.connectionString; FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read); BinaryReader reader = new BinaryReader(stream); byte[] file = reader.ReadBytes((int)stream.Length);//This line gives error reader.Close(); stream.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)