Click or drag to resize

Verhoeff.ValidateCheckSum Method

Validates a string of numeric characters has a valid Verhoeff checksum digit suffix character.

Namespace: Orthogonal.Common.Basic
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2025-03-15 14:42 GMT+11
Syntax
C#
public static bool ValidateCheckSum(
	string number
)

Parameters

number  String
The input string of numeric characters.

Return Value

Boolean
True if the argument value has a valid checksum digit suffix character.
Example
C#
bool ok = Verhoeff.ValidateCheckSum("123451");
Console.WriteLine($"123451 checks {ok}");
ok = Verhoeff.ValidateCheckSum("12345");
Console.WriteLine($"12345 checks {ok}");
// 123451 checks True
// 12345 checks False
See Also