Get File byte code from a file path C# (windows application)


you want to use System.IO namespace

 FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
            BinaryReader br = new BinaryReader(fs);
            byte[] photo = br.ReadBytes((int)fs.Length);
            br.Close();
            fs.Close();

Comments

Popular Posts