Is a reserved keyword?

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)

+8
c # linq reserved-words
source share
3 answers

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.

+14
source share

by used in LINQ query syntax. It is reserved only in the context of the query syntax .

+5
source share

by not a reserved word, it is a query word for using LINQ:

For example:

  (from x in Collection group x by n); 

You can escape any C # reserved word by using the @ symbol before it.

+4
source share

All Articles