Question: I am working on a windows application where I get value of a string called 'strData' from a function which has '\' in it. I want to split that string by '\' but I don't know why 'Split' function is not working.

```
 string strData= "0101-0000046C\0\0\0"; //This Value comes from a function
 string[] strTemp = strData.Split('\\');
 return strTemp[0];

```

The Value of 'strTemp[0]' is still "0101-0000046C\0\0\0". Please Help me

Answer: 
Your data is interpreted as a non-escaped string: this means all your `\0` in your code file get resolved to the ascii-char with the value of 0 (value-zero-char).

In your case you finally have to replace the value-zero-char like this:
`strData = strData.Replace("\0", "0\\");` then it works.

**Explanation:** this replaces the value-zero-char with a number-zero-char and a backslash.

As said you either have to escape the source string to `xxx\\0` or write an `@`-sign in front of the string- declaration like this: `var x = @"xxx";` (only theoretically, second method does not work here because you said you get the value from a function). This does in both cases normally solve your issue.
use `@` to interpret the string literally

```
string strData= @"0101-0000046C\0\0\0";

```

`\0` is only one character so add `@` before the string so that its interpreted literally