I read some C# article to combine a path using Path.Combine(part1,part2).
It uses the following:
string part1 = @"c:\temp";
string part2 = @"assembly.txt";
May I know what is the use of @ in part1 and part2?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@is not related to any method.It means that you don’t need to escape special characters in the string following to the symbol:
is equal to
Such string is called ‘verbatim’ or @-quoted. See MSDN.