Question: > 
> **Possible Duplicate:**  
> 
> [What's the @ in front of a string for .NET?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-for-net) 
> 
> 
> 

I understand using the `@` symbol is like an escape character for a string.

However, I have the following line as a path to store a file to a mapped network drive:

`String location = @"\\192.168.2.10\datastore\\" + id + "\\";`

The above works fine but now I would like to get a string from the command line so I have done this:

`String location = @args[0] + id + "\\";`

The above doesn't work and it seems my slashes aren't ignored. This my command:

`MyProgram.exe "\\192.168.2.10\datastore\\"`

How can I get the effect of the `@` symbol back?

Answer: 
The @ prefix means the string is a literal string and the processing of escape characters is not performed by the compiler, so:

```
@"\n"

```

is not translated to a newline character. Without it, you'd have:

```
String location = "\\\\192.168.2.10\\datastore\\\\" + id + "\\\\";

```

which looks a bit messy. The '@' tidies things up a bit. The '@' can only be prefixed to string constants, that is, things inside a pair of double quotes ("). Since it is a compiler directive it is only applied at compile time so the string must be known at compile time, hence,

```
@some_string_var

```

doesn't work the way you think. However, since all the '@' does is stop processing of escaped characters by the compiler, a string in a variable already has the escaped character values in it (10,13 for '\n', etc). If you want to convert a '\n' to 10,13 for example at run time you'll need to parse it yourself doing the required substitutions (but I'm sure someone knows a better way).

To get what you want, do:

```
String location = args[0] + id + "\\";

```
The @ symbol goes right before the quotes. It only works on string literals, and it simply changes the way the string is understood by the compiler. The main thing it does is cause `\` to be interpreted as a literal backslash, rather than escaping the next character. So you want:

```
String location = args[0] + id + @"\\";

```