M
Michael Rodriguez
Is this the correct way to write this?
DataSet ds;
try
{
ds = SomeFunctionThatReturnsADataSet();
// do some stuff with ds
...
}
finally
{
ds.Dispose();
}
Do I need to dispose it since I didn't explicitly create it? Can it hurt?
TIA,
Mike Rodriguez
DataSet ds;
try
{
ds = SomeFunctionThatReturnsADataSet();
// do some stuff with ds
...
}
finally
{
ds.Dispose();
}
Do I need to dispose it since I didn't explicitly create it? Can it hurt?
TIA,
Mike Rodriguez