Do you know there is an easy way to call automatically the Dispose method of objects that implement the IDisposable interface?
The using statement provides a small block of code that you can use to declare, instantiate and define the scope of your object as well.
The using statement will invoke the dispose method of your object as soon as it goes out of scope.
using (DataSet ds = new DataSet())
/// Your code goes here
/// The Dispose method from the DataSet will be called
To get full details about the using statement, click here!