Greetings,

Say i have the following class, which read has a function to return a dataset full of config info...:

class ReadConfig {

//logic to read config goes here, and config uses a dataset...

}

what i want is to able to use the using {} so that it can dispose. I know this is done like so...

class ReadConfig : IDisposable {

void IDisposable.Dispose() { }

//logic to read config here...

}

ok, so my question is, if im using a using{} block in my code to handle this, will is automatically dispose that dataset that it returns, as its not referenced, or do i manually need to call the dispose() method from within the function to return the dataset, or do i need to add an overloaded method, and dispose it in there??

Cheers, Justin