Alex Rivera | Logout

What does `@` mean at the start of a string in C#?

Asked 2010-04-14T23:51:06.300
14

Consider the following line:

readonly private string TARGET_BTN_IMG_URL = @"\\ad1-sunglim\Test\";

In this line, why does @ need to be attached?

Edit
Report

1 Answer

2

because you string contains escape sequence "\". in order to tell compiler not to treat "\" as escape sequence you have to use "@".

answered 2010-04-14T23:54:28.277

Your Answer