convert datatable to IEnumerable in c#

convert datatable to IEnumerable in c#

IEnumerable tables = ds.Tables;
List<DataRow> list = dt.AsEnumerable().ToList();
or
IEnumerable<DataRow> drows = dt.AsEnumerable();
IEnumerable rows = ds.Tables[0].Rows;

2020-02-29