다음을 통해 공유


Uri.IsHexDigit 메서드

지정된 문자가 유효한 16진수인지 여부를 확인합니다.

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

구문

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

returnValue = Uri.IsHexDigit(character)
public static bool IsHexDigit (
    char character
)
public:
static bool IsHexDigit (
    wchar_t character
)
public static boolean IsHexDigit (
    char character
)
public static function IsHexDigit (
    character : char
) : boolean

매개 변수

  • character
    유효성을 확인할 문자입니다.

반환 값

문자가 유효한 16진수이면 true이고 그렇지 않으면 false입니다.

설명

16진수는 0-9의 숫자와 A-F 또는 a-f의 문자입니다.

예제

다음 예제에서는 문자가 16진 문자인지 여부를 확인하고 16진 문자이면 해당하는 10진수를 콘솔에 씁니다.

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 네임스페이스