title: replace slashes in .Net
body: <p>I have a local file path containing "\" and I need to change all occurrences to "/" for a remote file path.</p>
  
  <p>I have tried</p>
  
  <pre><code>myString.replace("\","/")
  </code></pre>
  
  <p>and</p>
  
  <pre><code>myString.replace(Convert.ToChar(92), Convert.ToChar(47)) 
  </code></pre>
  
  <p>Both seem to leave the "\" in tact.. </p>
  
  <p><strong>Answer:</strong></p>
  
  <pre><code>NewString = myString.replace("\","/")
  </code></pre>
  
  <p>The problem was that I was not assigning it to a variable. Escaping the slash actually made it fail, in vb.net at least.</p>