The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Uri::HexEscape Method (Char)
.NET Framework (current version)
Converts a specified character into its hexadecimal equivalent.
Assembly: System (in System.dll)
Parameters
- character
-
Type:
System::Char
The character to convert to hexadecimal representation.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | character is greater than 255. |
The following example converts a character to its hexadecimal equivalent and writes it to the console.
char testChar = 'e'; if ( Uri::IsHexDigit( testChar ) == true ) { Console::WriteLine( "'{0}' is the hexadecimal representation of {1}", testChar, Uri::FromHex( testChar ) ); } else { Console::WriteLine( "'{0}' is not a hex character", testChar ); } String^ returnString = Uri::HexEscape( testChar ); Console::WriteLine( "The hexadecimal value of '{0}' is {1}", testChar, returnString );
.NET Framework
Available since 1.1
Available since 1.1
Show: