Guest User

Untitled

a guest
Nov 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace CornerCases
  5. {
  6. class WeirdQueryExpression
  7. {
  8. static WeirdQueryExpression Where(Func<int, int> projection)
  9. {
  10. return new WeirdQueryExpression { Select = ignored => "result!" };
  11. }
  12.  
  13. Func<Func<string, bool>, string> Select { get; set; }
  14.  
  15. static void Main()
  16. {
  17.  
  18. string query = from x in WeirdQueryExpression
  19. where x * 3
  20. select x.Length > 10;
  21. /*
  22. string query = WeirdQueryExpression.Where(x => x * 3)
  23. .Select(x => x.Length > 10);
  24. */
  25.  
  26.  
  27. Console.WriteLine(query);
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment