which approaches are correct about "using" (first or second)?
First:
using (DataTable dt = list.ToDataTable())
{
dataList.DataSource = dt;
dataList.DataBind();
}
Second:
using (DataTable dt = list.ToDataTable())
{
dataList.DataSource = dt;
}
dataList.DataBind();