KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: How does one tell if an IDisposable object reference is disposed? Is there a method to check if object has been disposed different then try { myObj.CallRandomMethod(); } catch (ObjectDisposedException e) { // now I know object has been disposed } In my case I'm using TcpClient class that has Close() method which disposes object and this can happen in piece of code I don't have control of. In this case I would like to have better solution then catching exception.
Tags (comma-separated)
Save Edits
Cancel