Uri.HexEscape メソッド
アセンブリ: System (system.dll 内)
構文
Dim character As Char Dim returnValue As String returnValue = Uri.HexEscape(character)
戻り値
指定した文字の 16 進数表現。
使用例
文字を対応する 16 進表現に変換し、コンソールに出力する例を次に示します。
Dim testChar As Char = "e"c If Uri.IsHexDigit(testChar) = True Then Console.WriteLine("'{0}' is the hexadecimal representation of {1}", testChar, Uri.FromHex(testChar)) Else Console.WriteLine("'{0}' is not a hexadecimal character", testChar) End If Dim returnString As String = Uri.HexEscape(testChar) Console.WriteLine("The hexadecimal value of '{0}' is {1}", testChar, returnString)
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 hexadecimal character", testChar); string returnString = Uri.HexEscape(testChar); Console.WriteLine("The hexadecimal value of '{0}' is {1}", testChar, returnString);
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- Uri.HexEscape メソッドのページへのリンク