I want to save an image without user interaction in C #


I m scanning image in a form i want to save the image with out user interaction in C# can any one help..

string chktemp = @"C:\"+pic+".tif";
  Bitmap bm= new Bitmap(from file);//Here it is asking already saved file with out this i want to save just now scanned image from form

Use IO to check if the current file exists, and if so delete it first. See: System.IO documentation

File.Exists http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx

File.Delete http://msdn.microsoft.com/en-us/library/system.io.file.delete.aspx