1

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.

Mark
  • 5,223
  • 11
  • 51
  • 81

2 Answers2

1

How about

dataset.DataTables.Skip(1)
linepogl
  • 9,147
  • 4
  • 34
  • 45
1
ds.Tables.OfType<DataTable>().Skip(1).ToList().ForEach(ACTION);
Steve Danner
  • 21,818
  • 7
  • 41
  • 51
  • This one looks good. However it hink you need to specify the generic type in OfType. So that means ds.Tables.OfType.Skip(1). I also think depending on the ACTION, it's better to have it in a foreach(DataTable dt in...). What do you think? – Mark Mar 10 '11 at 17:58
  • you are right...It's actually in there, but the editor strips out anytinhg between angle brackets for some reason. I'll try putting it in a code block. – Steve Danner Mar 10 '11 at 18:32