I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?
C# – How to decode HTML characters in C#
c++
Related Question
- C# – Case insensitive ‘Contains(string)’
- C# – How to get a consistent byte representation of strings in C# without manually specifying an encoding
- C# – LINQ’s Distinct() on a particular property
- C# – How would you count occurrences of a string (actually a char) within a string
- C# – Identify if a string is a number
- C# – JavaScriptSerializer – JSON serialization of enum as string
- C# – reason for C#’s reuse of the variable in a foreach
- C# – \d less efficient than [0-9]
Best Solution
You can use
HttpUtility.HtmlDecode
If you are using .NET 4.0+ you can also use
WebUtility.HtmlDecode
which does not require an extra assembly reference as it is available in theSystem.Net
namespace.