anil john

anil john

  • NA
  • 156
  • 210.3k

saving image problem

Jan 5 2013 5:20 AM


My code:


 FileStream fs = new FileStream(fname , FileMode.Open); // this line generates error

                byte[] data = new byte[fs.Length];

                fs.Read(data, 0, Convert.ToInt32(fs.Length));

                objItemMasterBL.Sticker = data;


Error:

The process cannot access the file 'C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg' because it is being used by another process.


Answers (1)