LINQ in Action roller

Get all combinations of two List<object[]>

Hey, i have a linq query to get all combinations of List List list1 = new List(); List list2 = new List(); var result = ( from a in this .list1 from b in this .list2 select new [] { a, b } ); This query gets all combinations in the form: object[][] Example (how it works now): List list1 = {o1 , o2} List list2 = {o3 , o4} The result is: object { {o1,o3} ; {o1,o4} ; {o2,o3} ; {o2,o4} } Now i want to change the two lists: List list1 = new List(); List list2 = new List(); i want that the result is still: Read More...
Published Thursday, April 24, 2008 5:34 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication