Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

@ symbol in front of string

Posted on 2008-06-11
2
Medium Priority
?
1,135 Views
Last Modified: 2008-10-08
What does it mean when you place an @ symbol in front of a string ie

string bob = @"james";
0
Comment
Question by:millerthegorilla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1200 total points
ID: 21763285
straigth from the docs:
http://msdn.microsoft.com/en-us/library/362314fe(VS.71).aspx
<...>
The advantage of @-quoting is that escape sequences are not processed, which makes it easy to write, for example, a fully qualified file name:
<..>
0
 
LVL 5

Assisted Solution

by:rstomar
rstomar earned 800 total points
ID: 21763290
It means it is a literal string.

If there are any special characters in the string like " (double quotes) the you don't have to use escape character \ .
E.g if you want to assign the string abc"def to a variable you can do it as follows in C# :
String strVar = "abc\"def";
OR
String strVar = @"abc"def";
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question