Solved

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

Posted on 2008-10-23
2
2,142 Views
Last Modified: 2012-05-05
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

0
Comment
Question by:cschene
2 Comments
 
LVL 23

Accepted Solution

by:
adathelad earned 250 total points
ID: 22790248
You're not assigning the result back into your variable...
i.e.

DPM_screenSaver_resp = DPM_screenSaver_resp.Replace("\", doubleSlash)
0
 

Author Comment

by:cschene
ID: 22790865
Thanks....I should have realized that!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now