In C#, my code is indirectly accessing a file. The file stays open long after what accessed it goes out of scope. I can't directly close the file, since I don't have a filestream for it.
Query: How do I either: Get a file handle my code has open indirectly so that I can close it? Tell my code it's time to close the file. (Similar to file.dispose() or file.close(), but I don't have the file object to start with.)
This isn't a "my code isn't working" question. It isn't about a bitmap specifically. Read the question. I want to know the general answer to do either of the options I asked for above. Stop projecting your interpretation onto the question and focus on what's actually in question.