CharExtensionTryParseDecimalDigit Method

Tries to interpret a character as a decimal digit (0-9) and to return the value that this decimal digit represents.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public static bool TryParseDecimalDigit(
	this char digit,
	out int? value
)

Parameters

digit  Char
The Unicode character to analyze.
value  NullableInt32
After the method has been successfully completed, it contains the value that digit represents as a decimal digit, otherwise null. The parameter is passed uninitialized.

Return Value

Boolean
true if digit represents a decimal digit, otherwise false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Char. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also