Recipe 3.27. Assuring an Object's Disposal
problem
You require a way to always have the Dispose method of an object called when that object's work is done or it goes out of scope.
Solution
Use the using statement:
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial