I canβt find the βbyβ in the reserved keyword lists in C #, but the Visual Studio Resharper plugin seems to think that it is the only one - it adds it using @escape whenever it generates code (for example, by refactoring the command)
is a Query Keyword , i.e. this keyword is only in certain positions within LINQ Query Expressions , in particular, only in group .
The context keyword by is used in the group expression in the query expression to indicate how the returned elements should be grouped.
by used in LINQ query syntax. It is reserved only in the context of the query syntax .
by
by not a reserved word, it is a query word for using LINQ:
query word
For example:
(from x in Collection group x by n);
You can escape any C # reserved word by using the @ symbol before it.
reserved
@