I know this isn't a C# group, but its just a quick one.
As a seasoned C++ developer I'm learning C# as I go along. What's the @
symbol for before a string?
eg:
FileInfo myFile = new FileInfo(@"c:\Temp\Test\readme.txt");
Why can't it just be:
FileInfo myFile = new FileInfo("c:\Temp\Test\readme.txt"); ?
Thanks
David
Its for treating the '\' marks as '\' marks, not leading characters.
Because it escapes all the characters in the string. It couldn't be the
second example you gave, it would have to be:
> What's the @ symbol for before a string?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Your second string would fail, as it is not escaping anything valid.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
|
*************************************************
"David" <a...@asd.com> wrote in message
news:guWdnfIZ3tO...@brightview.com...