case "Trend":
try
{
if (File.Exists(path + @"Trend.jpg"))
{
PublicClass.trendimage = "";
File.Delete(path + @"Trend.jpg");
}
else
{ }
objImage.SaveImage(path + @"Trend.jpg");
PublicClass.trendimage = path + @"Trend.jpg";
}
When I tried to delete the file using code. It shows me you can't delete the file it is being used in another process. So, please tell me how to delete the file.