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); } }
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); }
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); } }
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); } }