using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { int[] numbers = { 10, 20, 30, 40, 1, 2, 3, 8 }; // Only print items less than 10. var subset = from res in from i in numbers where i < 10 orderby i descending select i*9; foreach (int i in subset) Console.WriteLine("Item: {0}", i); } } input Output syntax highlight Ошибка компиляции time: 0.05 memory: 24376 signal:0 prog.cs(11,28): error CS1525: Unexpected symbol `into' Compilation failed: 1 error(s), 0 warnings Ошибка компиляции time: 0.05 memory: 24376 signal:0 prog.cs(11,95): error CS1525: Unexpected symbol `;', expecting `from', `group', `join', `let', `orderby', `select', or `where' Compilation failed: 1 error(s), 0 warnings Успешно time: 0.05 memory: 24376 signal:0 Item: 72 Item: 27 Item: 18 Item: 9 Успешно time: 0.05 memory: 24424 signal:0 Item: 8 Item: 3 Item: 2 Item: 1 Ошибка компиляции time: 0 memory: 0 signal:0 prog.cs(10,36): error CS1935: An implementation of `Where' query expression pattern could not be found. Are you missing `System.Linq' using directive or `System.Core.dll' assembly reference? Compilation failed: 1 error(s), 0 warnings Ошибка компиляции time: 0 memory: 0 signal:0 prog.cs(10,49): error CS1935: An implementation of `Where' query expression pattern could not be found. Are you missing `System.Linq' using directive or `System.Core.dll' assembly reference? Compilation failed: 1 error(s), 0 warnings Ошибка компиляции #stdin compilation error #stdout 0s 0KB comments (0) stdin copy сообщения компилятора prog.cs(9,4): error CS0246: The type or namespace name `IEnumerable' could not be found. Are you missing `System.Collections.Generic' using directive? prog.cs(10,22): error CS0841: A local variable `subset' cannot be used before it is declared Compilation failed: 2 error(s), 0 warnings stdout Standard output is empty http://i...content-available-to-author-only...e.com/95rIbo язык: C# created: 26 seconds ago видимость: открытый Share or Embed source code