Archive for February, 2008

LINQ: Combine elements in nested collection

By admin - Last updated: Thursday, February 14, 2008

Simple script to combine elements within nested list (A list’s elements are lists) static void Main(string[] args) {   // initialize a list object with List<string> elements   List<List<string>> nestedList = new List<List<string>>();   // add an element to the main list object   nestedList.Add(new List() { “a”, “b”, “c” });   // add another […]