Search code examples
c#unicodelatin

How are latin based characters seen?


I am going to write a simple console app in C# that replaces all Latin based characters with their respectively defined replacedment (like Å (ALT+143) becomes AA).

I was wondering how it is viewed in C#. Would it be seen as the string "\uC5" or "\u00C5" or "Å" or something else?


Solution

  • It is (almost!) always viewed as a character literal in format "\u00C5".

    See this article on Char.

    and this article specifically on character literals which, while outdated, still applies in the latest version of .NET.