Monthly Archives: February 2008

LINQ: Combine elements in nested collection

Simple script to combine elements within nested list.

static void Main(string[] args)

{

            List<List<string>> nestedList = new List<List<string>>();

            nestedList.Add(new List<string>() { “a”, “b”, “c” });

            nestedList.Add(new List<string>() { “d”, “e”, “f” });

            List<string> all = (from n […]