I'm adding more keywords to notepad++'s C# Syntax highlighting and it would really help if i had a complete list of LINQ keywords for c#.
+8
A:
From memory:
from select where join on equals group by orderby ascending descending into let
EDIT: As Eric says, you may want to include var
as well (you certainly should if you want to highlight all C# 3 contextual keywords).
If you're doing symbols too, you may want to include a pattern for =>
Jon Skeet
2009-09-12 08:28:09
Thanks Mehrdad: there was bound to be one I'd forgotten :)
Jon Skeet
2009-09-12 08:31:04
Accepting this one cause i can copy-paste right into the xml file :)
RCIX
2009-09-12 08:34:24
Nice Jon. Of course, "where" was not added originally as a LINQ contextual keyword, it was added as a contextual keyword for generic constraints, so now it is a contextual keyword twice over! It is debatable whether "var", which you omit, should be counted as a "LINQ keyword". It was added for LINQ scenarios but is not part of the query comprehension syntax.
Eric Lippert
2009-09-12 14:33:54
Yes, my natural translation of the question was "what are the keywords for query expressions" - I hadn't even considered `var`...
Jon Skeet
2009-09-12 14:52:30