Hi,
I Created the class
public class Test
{
public DataTable Show()
{
DataTable dt = null;
try
{
using (dt = new DataTable())
{
DataColumn dc = new DataColumn("ID");
dt.Columns.Add(dc);
DataRow drow = dt.NewRow();
drow["ID"] = 1;
dt.Rows.Add(drow);
}
}
catch (Exception)
{
throw;
}
return dt;
}
}
in this class i m created Show mehtod which contain datatable object in using block according to concept of dispose it should be ...
Go to the complete details ...