fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var xs = new int[] {1, 2, 3, 4, 5};
  9.  
  10. var results = from x in xs where x % 2 == 0 select 10 * x;
  11.  
  12. Console.WriteLine(string.Join(", ", results));
  13. }
  14. }
Success #stdin #stdout 0.02s 15708KB
stdin
Standard input is empty
stdout
20, 40