The dispose of an OpenFileDialog in C#?
问题 I have searched throughout entire Stack Overflow, but I couldn't find an answer to the following: When I'm using my OpenFileDialog, the files I open get blocked for use out of my program until I close my program. So if I open an image, I am not allowed to replace that image in my Windows Explorer anymore. I think this is a problem with disposing my OpenFileDialog, but I'm not sure how to solve it... My code: using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Title = "Open Image"; ofd