By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,543 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,543 IT Pros & Developers. It's quick & easy.


P: n/a
what is the signficance of the @?
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
ae <> wrote:
what is the signficance of the @?


Jon Skeet - <sk***>
If replying to the group, please do not mail me too
Jul 21 '05 #2

P: n/a

"ae" <> wrote in message
what is the signficance of the @?

Hello ae,

That's a character that tells the compiler to interpret a string verbatim.
It turns a regular-string-literal into a verbatim-string-literal.

If the @ character isn't used, then any backslashes in the string must be
(prepended with a backslash) || (appended with an escape character.)

Here is an example (without/with):

.... "c:\\windows\\system32\\pschdcnt.h";
.... @"c:\windows\system32\pschdcnt.h";
Another use:

.... "Line1\nLine2\nLine3";
.... @"Line1
Line3"; // multiline goodness. -- jBuelna
J. Buelna - Houston, TX
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.