TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nafees abbasi
NA
4
1.6k
Image is used by another process and not able to delete
Jul 13 2016 4:47 PM
I'm trying to delete image after deleting record from list in wpf C#. but it always throw exception that file is used by anohter process and not allow me to delete.
string appPath = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) + @"\screenshots\";
string schemename = selectedStockObject.Name.ToString();
objSchemeBLL = new SchemeBLL();
Scheme objTemp = objSchemeBLL.getSchemebyName(schemename);
GC.Collect();
Thread.Sleep(20);
File.Delete(objTemp.ImgPath);
Reply
Answers (
1
)
Basic C# program
datalist gallery