GetChkDigit
Calculates the check digit for the barcode data based on the specified calculation algorithm.
Syntax
■
[VB]
Public Shared Function GetChkDigit(ByVal bardata As String, _
ByVal type As Char) As Integer
[C#]
public static int GetChkDigit(string bardata, char type)
Parameters
■
bardata
[in] Barcode data
type
[in] Check digit type
Code Type
EAN(JAN), UPC
ITF
STF
CODABAR (NW-7)
CODE-39
MSI
Return value
■
Calculated check digit
Exceptions
■
Name of Exception
ArgumentException
Type
Calculation Method
'A'
MOD10
'I'
MOD10
'H'
MOD10
'N'
MOD16
'M'
MOD43
'P'
MOD10
Meaning
The barcode data is invalid, or
the specified check digit type is invalid.
- 103 -