using System;using System.Linq; public class Test{ public static void Main() { var list1 = new[]{"One", "Two"}; var list2 = new[]{"Uno", "Dos", "Tres"}; var list3 = new[]{1,2,3,4}; var result = from a in list1 from b in list2 from c in list3 select new {a, b, c}; foreach(var item in result) { Console.WriteLine(item.a + " " + item.b + " " + item.c); } }}
Standard input is empty
One Uno 1 One Uno 2 One Uno 3 One Uno 4 One Dos 1 One Dos 2 One Dos 3 One Dos 4 One Tres 1 One Tres 2 One Tres 3 One Tres 4 Two Uno 1 Two Uno 2 Two Uno 3 Two Uno 4 Two Dos 1 Two Dos 2 Two Dos 3 Two Dos 4 Two Tres 1 Two Tres 2 Two Tres 3 Two Tres 4
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!