DataTable dt = new
DataTable
{
Columns ={
{"Myid",typeof(int)},
{"Name"},
{"Address"}
}
};
dt.Rows.Add(1, "Arun Aravind",
"Kollam");
dt.Rows.Add(1, "Arun Aravind",
"Kollam");
dt.Rows.Add(2, "Arun Aravind",
"Kollam");
dt.Rows.Add(2, "Arun Aravind",
"Kollam");
dt.Rows.Add(3, "Arun Aravind",
"Kollam");
dt =
dt.DefaultView.ToTable(false, "Address", "Name",
"Myid");
Output
If u had any trouble just ask, Happy to help u :)
Stay Tune... Have a nice day... 'N happy Coding :)
No comments:
Post a Comment