-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"

Shell
  • 1

1 Answers1

0

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

Michał Turczyn
  • 32,028
  • 14
  • 47
  • 69