I have a DataTable object with 5 columns returned to me by a service. I am only interested in one of the columns, the FuncName column and would like my utility method that calls the service to strip out the extra information and just return a List<string> object with an element for the value of this column for each row of the DataTable. This seems like a perfect application for link to read the values from the DataTable and then add them to my List<string> but I just can't seem to figure out how best to write that code. I would think the Any<> method would be of some value, but I am not sure where to start.
table.AsEnumerable().Select(dr => dr.Field<string>("FuncName")).ToList()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With