convert datatable to anonymous list in c#

Convert datatable to anonymous list in c#

List<object> results = JsonConvert.DeserializeObject<List<object>>(JsonConvert.SerializeObject(dt));
List<object> results = new List<object>();
        var x = from emp in dt.Select()
                select new
                {
                    ID = emp["Id"],
                    Description = emp["Description"],
                    Code = emp["Code"],
                };
        results.AddRange(x)
        return  results;

2020-05-31