Reputation: 33
I want to extract only the elements of List corresponding to a specific index from List<List>.
Tried to do this using LINQ Query and not For or Foreach, but I wasn't lucky
I want the result like below
List<List<string>> list = new List<List<string>>();
list.Add(new List<string> { "1", "2", "3" });
list.Add(new List<string> { "A", "B", "C" });
// expectation result List : index 1
// { "2", "B" }
Upvotes: 2
Views: 57