#474 – You Can Include Unicode Characters in Your Source Code

You can enter Unicode characters directly into your source code using the editor in Visual Studio.  These characters will be stored and intepreted correctly, if contained in a comment or a string literal.  (Unicode characters are not used in any C# keywords).

You can also enter a hex code for the Unicode character, rather than entering the character directly.  (E.g. By copying/pasting it or entering from a keyboard that includes the character)

        static void Main()
        {
            string money = "€";
            string sameThing = "\u20AC";
        }

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 43 other followers