Returns the numerical value of the given hex digit character.

Namespace: CardWerk.SmartCard.Util
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Shared Function FromDigit( _ 
ByVal ch As Char
) As Integer
This language is not supported or no code example is available.
public static int FromDigit( 
char ch 
)
This language is not supported or no code example is available.
public:  
static int FromDigit( 
char ch 
)
This language is not supported or no code example is available.
public static function FromDigit( 
ch : char 
) : int;
This language is not supported or no code example is available.

Parameters

ch
Type: char

CardHex digit in any of the ranges '0' through '9', 'a' through 'f', or 'A' through 'F'. If any other character is given, then an ArgumentOutOfRangeException will be thrown.

Return Value

Type: int

Returns the numerical value of the given hex digit in the range from 0 through 15.

Exception type Condition

ArgumentOutOfRangeException

Thrown when one or more arguments are outside the required range.

Marc, 9/29/2022.

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0