I have used following code to save image but it shows following error:
Code :
byte[] fileByte = null;
string path = openFileDialog1.FileName;
FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long allbyte = new FileInfo(path).Length;
fileByte = br.ReadByte((Int32)allbyte);
fs.Close();
fs.Dispose();
br.Close();
Error :
Error 1 No overload for method 'ReadByte' takes '1' argument
please solve above problem and also provide the solution for reading image same as converted via above code