How do I replace back slash with double back slash in vb.net string

I have the attached code snippit and I want to replace the "\" with "\\" but the code does not work.

Why?

there is probaby a very simple answer

I tried
Dim doubleSlash As String = Chr(92) & Chr(92)
                DPM_screenSaver_resp.Replace("\", doubleSlash)

Open in new window

Christopher ScheneSystem Engineer/Software EngineerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
adatheladConnect With a Mentor Commented:
You're not assigning the result back into your variable...
i.e.

DPM_screenSaver_resp = DPM_screenSaver_resp.Replace("\", doubleSlash)
0
 
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
Thanks....I should have realized that!
0
All Courses

From novice to tech pro — start learning today.