Abhilash J A

Abhilash J A

  • NA
  • 2.4k
  • 582.5k

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

Nov 26 2016 12:17 AM
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)