Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9280223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:49:10+00:00 2026-06-18T17:49:10+00:00

first, it’s not a duplication of What does the @ symbol before a variable

  • 0

first, it’s not a duplication of
What does the @ symbol before a variable name mean in C#?

as group is not a preserved keyword.

I wrote some code and the resharper suggested me to add @ before the variable group.

Any idea why?

var group = GetDefaultGroup(ClientServiceCommon.Poco.Group);

filteredPairs = @group.Pairs.ToList();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:49:11+00:00Added an answer on June 18, 2026 at 5:49 pm

    As you correctly point out, group is not a reserved keyword (the language designers try hard not to introduce new reserved keywords when they add new features to the language in order to not break existing programs).
    It is, however, a contextual keyword: it becomes a keyword within LINQ query expressions. Resharper is suggesting you rename the variable in question to avoid ambiguities that would result if this variable were used within query expressions.

    From the language specification:

    7.16.1 Ambiguities in query expressions

    Query expressions contain a number of “contextual keywords”, i.e., identifiers that have special
    meaning in a given context. Specifically these are from, where, join,
    on, equals, into, let, orderby, ascending, descending, select, group
    and by. In order to avoid ambiguities in query expressions caused by
    mixed use of these identifiers as keywords or simple names, these
    identifiers are considered keywords when occurring anywhere within a
    query expression. For this purpose, a query expression is any
    expression that starts with “from identifier” followed by any token
    except “;”, “=” or “,”.

    If you tried to do the following, you would get a compiler error:

    var filteredParis = from pair in group.Pairs // group is now treated as a keyword
                        select pair;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, this has never worked before, so it is not specifically related to VS
first of all some details: I configured security as below in web.xml view plaincopy
First, some context: I'm a Python developer who has written a medium-sized application using
First I have this. <form method=post action=<? echo $_SERVER['PHP_SELF']; ?>> <input type=text name=varenummer id=varenummer
first post here on stack overflow, hoping to get some advice on how to
First a little background. I got a warning in NetBeans told me not to
First I've used LocalTime before I realized that it adds a timezone information. Now
First, the general situation... a 3rd-party library loaded through a DLL does rendering into
first of all, I'm not good with jQuery and coding. I'm trying to achieve
First, please tell me if I'm not allowed to ask about this protocol here...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.