4
Answers

cannot convert type 'datarow ' to 'datatable.' c#

Mani Kandan

Mani Kandan

7y
242
1
I have a dataset, that contain list of rows. I want last row from the dataset. Then asign this dataset to datatable.
 
  1. DataTable dt = (DataTable)ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1];    
How to solve this error? 
Answers (4)