fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. static int getStuff(){
  7. System.Console.WriteLine("called");
  8. return 2;
  9. }
  10.  
  11. public static void Main()
  12. {
  13. if ((let thing = getStuff()
  14. from option in new int[] {1, 2, 3}
  15.  
  16. where option == thing
  17. select option).Any())
  18. System.Console.WriteLine("option");
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0.03s 24208KB
stdin
Standard input is empty
compilation info
prog.cs(13,11): error CS1525: Unexpected symbol `thing'
prog.cs(14,3): error CS1525: Unexpected symbol `from'
prog.cs(17,17): error CS1525: Unexpected symbol `)', expecting `;' or `}'
prog.cs(17,24): error CS1525: Unexpected symbol `)', expecting `;' or `}'
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty