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

  • SEARCH
  • Home
  • 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 490999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:57:58+00:00 2026-05-13T01:57:58+00:00

I am trying to follow some tutorials for ASP.Net and for the life of

  • 0

I am trying to follow some tutorials for ASP.Net and for the life of me, I just can’t figure out what the @ Symbol does when it is before an variable.

I thought it was just a shortcut to either session variables or request.form, but I have tried it in a few places without any luck.

When I put it in somewhere at random, I get the error : Expression Expected, however, when I look at the examples I am working from, they do not look like expressions so I am very confused!

Please help!?

  • 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-05-13T01:57:59+00:00Added an answer on May 13, 2026 at 1:57 am

    The @ symbol in C# allows you to use a keyword as a variable name.

    For instance:

    //this will throw an exception, in C# class is a keyword
    string class = "CSS class name"; 
    
    //this won't
    string @class = "CSS class name"; 
    

    Usually it’s best to avoid using keywords as variable names, but sometimes it’s more elegant than having awkward variable names. You tend to most often see them when serialising stuff for the web and in anon types.

    Your error is probably due to applying the @ before a variable name that isn’t a keyword.

    Update:

    In T-SQL @ is always used before parameter names, for instance:

    select * 
    from [mytable]
    where [mytable].[recId] = @id
    

    You would then specify the @id parameter when you called the query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to follow some starter guides for using MEF in .Net 4,
I'm trying to follow some of the introduction to Grails tutorials and am at
I am somewhat new to node programming and trying to follow some tutorials. They're
I'm trying to follow some tutorials to learn how to use Git but some
I'm trying to follow along with some tutorials on the web on Xcode programming.
I'm learning MVC and trying to follow some tutorials and this video http://channel9.msdn.com/Events/DevDays/DevDays-2011-Netherlands/Devdays002 In
I'm trying to follow some example code from microsofts mdn site.. var WshShell =
I’ve been trying to follow some examples for uploading data to a website. I
I'm trying to follow the steps to compile some C code to import into
First some background: I'm working on an application and I'm trying to follow MVVM

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.