title: WebUtility.HtmlDecode vs HttpUtilty.HtmlDecode
body: <p>I was using <code>WebUtilty.HtmlDecode</code> to decode HTML. It turns out that it doesn't decode properly, for example, <code>&amp;#8211;</code> is supposed to decode to a "&#8211;" character, but <code>WebUtilty.HtmlDecode</code> does not decode it. <code>HttpUtilty.HtmlDecode</code>, however, does.</p>
  
  <pre><code>Debug.WriteLine(WebUtility.HtmlDecode("&amp;#8211;"));
  Debug.WriteLine(HttpUtility.HtmlDecode("&amp;#8211;"));
  
  
  &gt; &amp;#8211;
  &gt; –
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/vPdJ9.jpg" alt="decode screenshot"></p>
  
  <p>The documentation for both of these is the same:
  <em>Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.</em></p>
  
  <p>Why are they different, which one should I be using, and what will change if I switch to WebUtility.HtmlDecode to get "&#8211;" to decode correctly?</p>