Search code examples
c#datatabledatasetenumerationcode-readability

How to enumerate through the DataTables of a DataSet starting at the second table in the collection using C#


A for loop starting at index 1 is an obvious answer. I'm sure there are many other ways to do this. But what is the most readable way?

The question is using C# 4.0. LINQ is optional.


Solution

  • ds.Tables.OfType<DataTable>().Skip(1).ToList().ForEach(ACTION);