Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace CornerCases
- {
- class WeirdQueryExpression
- {
- static WeirdQueryExpression Where(Func<int, int> projection)
- {
- return new WeirdQueryExpression { Select = ignored => "result!" };
- }
- Func<Func<string, bool>, string> Select { get; set; }
- static void Main()
- {
- string query = from x in WeirdQueryExpression
- where x * 3
- select x.Length > 10;
- /*
- string query = WeirdQueryExpression.Where(x => x * 3)
- .Select(x => x.Length > 10);
- */
- Console.WriteLine(query);
- }
- }
- }
Add Comment
Please, Sign In to add comment