Using Objects That Encapsulate Resources
Full Name:
Using Objects That Encapsulate Resources
Short Name:
Using Objects That Encapsulate Resources
Type of Entity:
C#
Abstract:
When you write code that uses an object that encapsulates a resource, you should make sure that the object's Dispose method gets called when you are finished using the object. You can do this with the C# using statement or by implementing a try/finally block in other languages that target the common language runtime.
MSDN Source URL:
http://msdn2.microsoft.com/3bwa4xa9.aspx