Skip to tool

C# Character number Online

Get code point of first character.

The output updates as you type. The tool processes input in your browser.

Worked example

Use a non-ASCII character to see why the byte, UTF-16 code unit, and Unicode code point can differ.

Sample input
A
Sample output
65

Using this operation in C#

The interactive result uses JavaScript. System.String indexes UTF-16 code units. Pass a StringComparison explicitly when the result must be independent of culture.

C# reference