J Jon Skeet [C# MVP] Dec 20, 2004 #2 ae said: what is the signficance of the @? Click to expand... See http://www.pobox.com/~skeet/csharp/faq/#verbatim.literals
ae said: what is the signficance of the @? Click to expand... See http://www.pobox.com/~skeet/csharp/faq/#verbatim.literals
J J. Buelna - Houston, TX Dec 21, 2004 #3 ae said: what is the signficance of the @? Click to expand... 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 Line2 Line3"; // multiline goodness. -- jBuelna J. Buelna - Houston, TX
ae said: what is the signficance of the @? Click to expand... 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 Line2 Line3"; // multiline goodness. -- jBuelna J. Buelna - Houston, TX