Both VB.NET and C# now has the 'Using' statement that will automatically Dispose of objects that implement IDisposible. This makes for much cleaner code. In well written programs, calling Dispose will release resources, close file handles etc. Take for example the DataView object in .NET:
protected override void Dispose(bool disposing){ if (disposing) { this.Close(); } base.Dispose(disposing);}
As you can see, calling Dispose will also Close the object. No need for you to worry about closing the DataView. Now, lets talk about Crystal Reports that comes with Visual Studio 2005. Calling Dispose on their ReportClass does not close the report. After 75 report generations it will actually cause an exception! To fix it you have to close your application (not an easy thing to do for an ASP.NET application) and restart. So if you use 'Using' with the ReportClass, you first need to call .Close before the end of the statement. Reason #77 why Crystal Reports sucks!