title: Return code point of characters in C#
body: <p>How can I return the <a href="https://en.wikipedia.org/wiki/Code_point" rel="noreferrer">Unicode Code Point</a> of a character? For example, if the input is "A", then the output should be "U+0041". Ideally, a solution should take care of <a href="https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates" rel="noreferrer">surrogate pairs</a>.</p>
  
  <p>With <em>code point</em> I mean the actual code point <a href="http://unicode.org/glossary/#code_point" rel="noreferrer">according to Unicode</a>, which is different from <em><a href="http://unicode.org/glossary/#code_unit" rel="noreferrer">code unit</a></em> (UTF8 has 8-bit code units, UTF16 has 16-bit code units and UTF32 has 32-bit code units, in the latter case the value is equal to the code point, after taking endianness into account).</p>