View Single Post
  #2 (permalink)  
Old November 30th, 2010, 03:22 PM
DrPurdum DrPurdum is offline
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default The @ operator

Hi Comecme:

If you look way back on page 122, you'll see that the amperand operator (@) is used when you wish to use string literals in a verbatim manner. As you know, the backslash can be used as a "lead-in" character for special escape sequences, like "\n" for a newline character. If you place the ampersand before the string variable on the righthand side of an assignment, that means you want a verbatim translation of the string. A common example is a directory path like: "C:\Windows\System". If you don't use the ampersand character, the same string would have to be written" "C:\\Windows\\System". Reread pages 122-123 and I think you'll see what I mean.
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)