Interviews2 answers
How do I make sure that an object is released in code such as a connection or file object?
2 Answers
Using statement is a very good solution for that kind of problem. When execution comes to the end of the using block. Then CLR automatically released the object. Its nice practice to always use using statement for unmanaged resources.
Chandrakant PatilPosted Mar 13, 2019, 7:26 AM EDT
You should use Using statement provided by CSharp.
You can touch base with me on http://dotnetpiper.blogspot.in/
Sachin KaliaPosted Apr 21, 2014, 10:42 PM EDT

