-5

I know how to split string. For example.

 var str = line.Split(',')[1];

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Müllabfuhr", "Müllabfuhr\Müllabfuhr.csproj", "{1909EBCB-DDDF-469E-9F84-0B0A3B86A861}"

String i used to split.

I want to do the same but now split at "\" . I treid to just insert "\" instead of ",", but i doesnt seem to work.

"C:\Users\lennartf\Desktop\Unbenannt.png"

1
  • 1
    A backslash like any escaped character starts with \, so write \\ Commented Aug 22, 2017 at 7:09

1 Answer 1

0

Try this: var str = @"C:\Users\lennartf\Desktop\Unbenannt.png".Split('\\');

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.