Have you ever tried to combine sequences in order to build Cartesian products in LINQ ? This is really easily achieved using the query expressions syntax, writing for instance : var ints = Enumerable.Range(1, 4); var longs = Enumerable.Range(1, 3).Select(i => (long)i); var products = from i in ints from l in longs select i…