fork(2) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. int[] numbers = { 10, 20, 30, 40, 1, 2, 3, 8 };
  10. // Only print items less than 10.
  11. var subset = from res in from i in numbers where i < 10 orderby i descending select i*9;
  12. foreach (int i in subset)
  13. Console.WriteLine("Item: {0}", i);
  14.  
  15. }
  16. }
  17.  
  18. input
  19. Output
  20.  
  21. syntax highlight
  22.  
  23. Ошибка компиляции time: 0.05 memory: 24376 signal:0
  24.  
  25. prog.cs(11,28): error CS1525: Unexpected symbol `into'
  26. Compilation failed: 1 error(s), 0 warnings
  27.  
  28. Ошибка компиляции time: 0.05 memory: 24376 signal:0
  29.  
  30. prog.cs(11,95): error CS1525: Unexpected symbol `;', expecting `from', `group', `join', `let', `orderby', `select', or `where'
  31. Compilation failed: 1 error(s), 0 warnings
  32.  
  33. Успешно time: 0.05 memory: 24376 signal:0
  34.  
  35. Item: 72
  36. Item: 27
  37. Item: 18
  38. Item: 9
  39.  
  40. Успешно time: 0.05 memory: 24424 signal:0
  41.  
  42. Item: 8
  43. Item: 3
  44. Item: 2
  45. Item: 1
  46.  
  47. Ошибка компиляции time: 0 memory: 0 signal:0
  48.  
  49. 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?
  50. Compilation failed: 1 error(s), 0 warnings
  51.  
  52. Ошибка компиляции time: 0 memory: 0 signal:0
  53.  
  54. 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?
  55. Compilation failed: 1 error(s), 0 warnings
  56.  
  57. Ошибка компиляции #stdin compilation error #stdout 0s 0KB
  58. comments (0)
  59. stdin
  60. copy
  61.  
  62. сообщения компилятора
  63.  
  64. prog.cs(9,4): error CS0246: The type or namespace name `IEnumerable' could not be found. Are you missing `System.Collections.Generic' using directive?
  65. prog.cs(10,22): error CS0841: A local variable `subset' cannot be used before it is declared
  66. Compilation failed: 2 error(s), 0 warnings
  67.  
  68. stdout
  69.  
  70. Standard output is empty
  71.  
  72. http://i...content-available-to-author-only...e.com/95rIbo
  73. язык:
  74. C#
  75. created:
  76. 26 seconds ago
  77. видимость:
  78. открытый
  79.  
  80. Share or Embed source code <script src="http://i...content-available-to-author-only...e.com/e.js/95rIbo" type="text/javascript" ></script>
  81.  
  82.  
  83.  
Compilation error #stdin compilation error #stdout 0.05s 24376KB
stdin
Standard input is empty
compilation info
prog.cs(11,93): error CS1525: Unexpected symbol `;', expecting `from', `group', `join', `let', `orderby', `select', or `where'
prog.cs(18,4): error CS1525: Unexpected symbol `input'
prog.cs(25,53): error CS1056: Unexpected character ``'
prog.cs(25,58): error CS1010: Newline in constant
prog.cs(30,53): error CS1056: Unexpected character ``'
prog.cs(30,55): error CS1012: Too many characters in character literal
prog.cs(30,76): error CS1056: Unexpected character ``'
prog.cs(30,82): error CS1012: Too many characters in character literal
prog.cs(30,93): error CS1056: Unexpected character ``'
prog.cs(30,97): error CS1012: Too many characters in character literal
prog.cs(30,111): error CS1056: Unexpected character ``'
prog.cs(30,118): error CS1012: Too many characters in character literal
prog.cs(49,56): error CS1056: Unexpected character ``'
prog.cs(49,62): error CS1012: Too many characters in character literal
prog.cs(49,158): error CS1056: Unexpected character ``'
prog.cs(49,174): error CS1012: Too many characters in character literal
prog.cs(54,56): error CS1056: Unexpected character ``'
prog.cs(54,62): error CS1012: Too many characters in character literal
prog.cs(54,158): error CS1056: Unexpected character ``'
prog.cs(54,174): error CS1012: Too many characters in character literal
prog.cs(57,19): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(57,44): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
prog.cs(64,56): error CS1056: Unexpected character ``'
prog.cs(64,68): error CS1012: Too many characters in character literal
prog.cs(65,48): error CS1056: Unexpected character ``'
prog.cs(65,55): error CS1012: Too many characters in character literal
prog.cs(74,2): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
Compilation failed: 27 error(s), 0 warnings
stdout
Standard output is empty