Inheritance: NoCommons.Common.StringNumber
コード例 #1
0
 internal static void ValidateChecksum(String kidnummer)
 {
     StringNumber k = new Kidnummer(kidnummer);
     int kMod10 = CalculateMod10CheckSum(GetMod10Weights(k), k);
     int kMod11 = CalculateMod11CheckSum(GetMod11Weights(k), k);
     if (kMod10 != k.GetChecksumDigit() && kMod11 != k.GetChecksumDigit()) {
         throw new ArgumentException(ERROR_INVALID_CHECKSUM + kidnummer);
     }
 }
コード例 #2
0
        private static void ValidateChecksum(String kidnummer)
        {
            StringNumber k = new Kidnummer(kidnummer);
            int kMod10 = CalculateMod10CheckSum(GetMod10Weights(k), k);
            int kMod11 = CalculateMod11CheckSum(GetMod11Weights(k), k);

            if (kMod10 != k.GetChecksumDigit() && kMod11 != k.GetChecksumDigit())
                throw new ArgumentException(InvalidChecksumErrorMessage + kidnummer);
        }
コード例 #3
0
        private static void ValidateChecksum(String kidnummer)
        {
            StringNumber k      = new Kidnummer(kidnummer);
            int          kMod10 = CalculateMod10CheckSum(GetMod10Weights(k), k);
            int          kMod11 = CalculateMod11CheckSum(GetMod11Weights(k), k);

            if (kMod10 != k.GetChecksumDigit() && kMod11 != k.GetChecksumDigit())
            {
                throw new ArgumentException(InvalidChecksumErrorMessage + kidnummer);
            }
        }
コード例 #4
0
        internal static void ValidateChecksum(string kidnummer)
        {
            StringNumber k      = new Kidnummer(kidnummer);
            int          kMod10 = CalculateMod10CheckSum(GetMod10Weights(k), k);
            int          kMod11 = CalculateMod11CheckSum(GetMod11Weights(k), k);

            if (kMod10 != k.GetChecksumDigit() && kMod11 != k.GetChecksumDigit())
            {
                throw new ArgumentException(ERROR_INVALID_CHECKSUM + kidnummer);
            }
        }