다음을 통해 공유


Uri.HexEscape 메서드

지정된 문자를 16진수 값으로 변환합니다.

네임스페이스: System
어셈블리: System(system.dll)

구문

‘선언
Public Shared Function HexEscape ( _
    character As Char _
) As String
‘사용 방법
Dim character As Char
Dim returnValue As String

returnValue = Uri.HexEscape(character)
public static string HexEscape (
    char character
)
public:
static String^ HexEscape (
    wchar_t character
)
public static String HexEscape (
    char character
)
public static function HexEscape (
    character : char
) : String

매개 변수

  • character
    16진수 표현으로 변환할 문자입니다.

반환 값

지정된 문자의 16진수 표현입니다.

예외

예외 형식 조건

ArgumentOutOfRangeException

character가 255보다 큰 경우

예제

다음 예제에서는 문자를 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에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Uri 클래스
Uri 멤버
System 네임스페이스