title: Replacing double quote with a single quote
body: <p>I have the following string in c#:</p>
  
  <pre><code>string ptFirstName = tboxFirstName.Text;
  </code></pre>
  
  <p><code>ptFirstName</code> returns: <code>"John"</code></p>
  
  <p>I wish to convert this to <code>'John'</code></p>
  
  <p>I have tried numerous variations of the following, but I am never able to replace double quotes with single quotes:</p>
  
  <pre><code>ptFirstName.Replace("\"", "'");
  </code></pre>
  
  <p>Can anybody enlighten me?</p>
  
  <p>My goal is to write this to an XML file:</p>
  
  <pre><code>writer.WriteAttributeString("first",ptFirstName);   // where ptFirstName is 'John' in single quotes.
  </code></pre>