?
Solved

@ symbol in front of string

Posted on 2008-06-11
2
Medium Priority
?
1,134 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

801 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