using , , .
public void Caller()
{
using(DataSet ds = GetDataSet())
{
}
}
public DataSet GetDataSet()
{
return ds;
}
using , :
DataSet ds = null;
try
{
}
finally
{
if(ds != null)
{
ds.Dispose();
ds = null;
}
}
, using , using, Disposed (.. , ..), , . , , IDisposable . , , , Stream, .
, finally . , IDispoable . using, using, , , , , . Microsoft DataSet , - , .