0

I would like to take a string containing HTML character entities such as  , etc. and replace them with the literal string characters. Does C# come with a library that has all the HTML character entities in which I could use to parse/replace characters in my strings?

List of HTML character entities: Wikipedia

1

1 Answer 1

8

You can try using the HtmlDecode method of the HttpUtility class.

Sign up to request clarification or add additional context in comments.

2 Comments

If you are using .Net framework 4+ you may prefer WebUtility.HtmlDecode
".NET", not ".Net".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.