Hi Krishna,
In first line you have declared and Instantiated an object of Class DataTable
In second line you have declared and Instantiated an object of SqlDataAdapter with query
"select * from users" and a SqlConnection object
con.
In Third line you have filled the DataTable object using SqlDataAdapter object da by Fill method.
The Fill method is used to fill DataTable of DataSet with data from DataBase (As per query you have used with the DataAdapter).
Now finally the foreach loop
=====================
Its one of the great feature of C#, Its loop on collection, array and so forth.
foreach (DataRow dr in dt.Rows)
Here dt.Rows is collection of rows in the DataTable dt and dr is the instance of that row or that iteration. So the Loop will be Iterate no. of rows count. I.e. If there are 10 rows than the loop will iterate 10 times.
And every time the dr will represent current row. At first iteration It will represent first row at second itr it will represent second row and so forth.
Thanks and Regards.
Rk_Hirpara.