Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-23
2
Medium Priority
?
2,364 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:Christopher Schene
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
adathelad earned 1000 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:Christopher Schene
ID: 22790865
Thanks....I should have realized that!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

719 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