Usage of using key word
Usage of using key word
if you are handling with dataset or datatable in your code all are suggest to donot forget dispose like that
that is the good suggestion because it will occupy more memory
example for without using keyword
DataSet ds = new DataSet();
ds.Dispose ();
example for with using keyword
using (DataSet dss = new DataSet())
{
ds.Tables[0].Rows[0][0] = "veera";
}
in first example we are using dispose method to dispose the dataset object but in second example we are not using dispose method
because using () keyword automatically dispose the dataset object
so if you forget to dispose always you use using keyword it will automatically do
:) donot worry about dispose using keyword take care of it
Regards
Veera