You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Using Statement<br />
using System;<br />
Using statement causes<br />
class Class1<br />
automatic call to Dispose<br />
{<br />
to be generated at<br />
static void Main(string[] args)<br />
compile time<br />
{<br />
using(DataBaseManager dbm = new DataBaseManager())<br />
{<br />
//use dbm<br />
}<br />
}<br />
}//Dispose method of dbm called automatically!<br />
public class DataBaseManager : IDisposable<br />
{<br />
void IDisposable.Dispose()<br />
{<br />
//database cleanup code<br />
}<br />
}<br />
46