Reputation: 8001
I am getting a string "lb/in²" (which I want to show as lb/in²) from server. I want to decode this and show it in my Xamarin.iOS app.
I tried:
System.Net.WebUtility.HtmlDecode("lb/in²")
but its not working, still shows as "lb/in²".
Upvotes: 1
Views: 622
Reputation: 101583
Html entity should end with ";" character. This should work fine:
System.Net.WebUtility.HtmlDecode("lb/in²");
If you are getting string exactly as you posted - you should fix the side which you are getting this string from, because "²" is not html entity, it's just a "²" string.
Upvotes: 1