View Single Post
  #3 (permalink)  
Old November 30th, 2010, 05:09 PM
comecme comecme is offline
Registered User
 
Join Date: Nov 2010
Location: Noardburgum, Friesland, The Netherlands
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi DrPurdum, thanks for the quick reply.

I know you can use the @ for verbatim string literals. But in this code you are using verbatim variable names. I've tried the code without the @ and it doesn't seem to make any difference.
Code:
// Verbatim string literal
string strVerbatim = @"C:\Temp";
 
// Verbatim variable named int
int @int = 1;
 
// Part of code listing 13-1
string startingPath = @startingPathTextBox.Text;
var myDrive = new DriveInfo(@buff);
In your code, if you'd be using string literals, both @'s would make sense.

PS: Isn't the ampersand operator the & and the at sign @?