Solved

@ symbol in front of string

Posted on 2008-06-11
2
1,128 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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 300 total points
Comment Utility
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 200 total points
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applicationsā€¦
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the reā€¦
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now