title: String.Replace() is not working as expected to replace weird chars in strings in C#
body: <p>I have a string <strong>DisplayName</strong> which has value as &quot;<strong>Vinny' Direct Reports</strong>&quot;. I am trying to replace &quot;<strong>'</strong>&quot;with &quot;<strong>-</strong>&quot;in string as it failing to get ingested into my Data Source.</p>
  <p>Below is the code where I am trying to replace.</p>
  <pre><code>if (DisplayName.Contains(&quot;'&quot;, StringComparison.OrdinalIgnoreCase) == true)
          {
              DisplayName.Replace(&quot;'&quot;, &quot;-&quot;).Replace(&quot;\&quot;&quot;, &quot;-&quot;);
              Console.WriteLine(DisplayName);
          }
  </code></pre>