It may seem easy but I cannot find the way: dt.Rows[r].Cells[c]
does not work for DataTable.
This is what I have tried. I do not have other ideas.
It may seem easy but I cannot find the way: dt.Rows[r].Cells[c]
does not work for DataTable.
This is what I have tried. I do not have other ideas.
dt.Rows[r]
should return a DataRow
assuming r
is an int
value between 0
and dt.Rows.Count-1
inclusive.
To get a specific cell value from a DataRow
you use one of it's indexers, so you don't need the .Cells
- you can just do dt.Rows[r][c]
where c
is either an int
, a string
or a DataColumn