-1

I want "PRR\17-18\12" to be PRR\17-18\12

I Have tried below ways but its not working

DepositCode.Replace("\\", "\"); DepositCode.Replace(@"\", @"\");

someone please help

DeveViru
  • 190
  • 3
  • 13
  • "it's not working" doesn't really help. "It doesn't compile" would do. Better still is "I get 'unrecognised escape sequence' when I have `"\"`". – Wai Ha Lee Dec 26 '17 at 11:50
  • 3
    There is no double backslashes in your exmaple – TheGeneral Dec 26 '17 at 11:50
  • Please bother to use the search next time. When searching for the exact question title, there are **a lot** of results… – poke Dec 26 '17 at 12:01

1 Answers1

1

Do you want something like that;

DepositCode= DepositCode.Replace(@"\\", @"\");
lucky
  • 12,734
  • 4
  • 24
  • 46