[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

@ symbol in front of string

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

872 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