-
May 29th, 2013, 12:32 PM
#1
What is the purpose of @ here?
Here is the example,
Code:
string ex = @"This has a carriage return\r\n"
Thanks.
-
May 29th, 2013, 01:50 PM
#2
Re: What is the purpose of @ here?
It declares the string to be literal. It will therefore NOT interpret \r as a carriage return escape sequence and \n as a newline escape sequence. Read more at http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
-
May 29th, 2013, 07:36 PM
#3
Re: What is the purpose of @ here?
Originally Posted by LarryChen
Here is the example,
Code:
string ex = @"This has a carriage return\r\n"
Thanks.
Really, Larry? Instead of posting a question like this to the forum, why not remove the @ and see what happens? Then look in msdn if you still have questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|