Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 17-11-2009
Member
 
Join Date: Aug 2009
Posts: 155
What does at @ identifier means in C#

I am learning C sharp. I have to connfess that Csharp has introduced many concepts for programming an application on a .NET platform that makes it so easy to code and use it. But still I have confusion on the use of @ symbol in Csharp. What is the @ symbol actually used for. I guess it is for a String Literal only. Am I correct ?
Reply With Quote
  #2  
Old 17-11-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: What does at @ identifier means in C#

The @ symbol does not always conveys that the following is a Verbatim String Literal. If a string is enclosed in quotation marks and is precided by the @ sign only the it is considered as Verbatim string literal. But we can make use of @ symbol to make use of keywords of Csharp as general variables.
Reply With Quote
  #3  
Old 17-11-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: What does at @ identifier means in C#

Csharp is the best to code various progams that are for Microsofts .Net platform. It helped me alot to understand and make applications for .Net. To solve your confusion the answer that it is not that @ symbol signifies everything as a string literal always. It can be useful for including Csharp keyword as a variable in your programming code.

Last edited by Zecho : 17-11-2009 at 01:20 AM.
Reply With Quote
  #4  
Old 17-11-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: What does at @ identifier means in C#

Let us consider that for instance the programmer need to make use of a keyword as a variable since it is very easy to indentify the value contained in that variable from its name, in this case the programmer wants a variable with name class.
For example,
Code:
 int class = 22;
But as we know that class is a keyword for C# and thus it cannot be used as variable name. But C# allows this by prefixing the at sign- @ before the keyword.
Code:
int @class = 22;
Although this is not considered as a good practise.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What does at @ identifier means in C#"
Thread Thread Starter Forum Replies Last Post
<identifier> expected error mbueling Software Development 2 18-10-2011 06:04 AM
Multi-part Identifier could not be found Ananias Software Development 3 19-05-2009 01:03 PM
TrIDNET - File Identifier Spykar Reviews 2 02-12-2008 07:07 PM
Identifier Expected Error in JAVA Brake Fail Software Development 7 25-10-2008 02:35 PM
this is the WaveFormat or FourCC identifier of the codec Landon Media Player 3 15-09-2008 02:54 AM


All times are GMT +5.5. The time now is 08:37 PM.