Add IBAN validation
This commit is contained in:
@ -21,5 +21,11 @@ namespace WGneu {
|
||||
yield return childOfChild;
|
||||
}
|
||||
}
|
||||
|
||||
public static int Modulo(string a, int b) {
|
||||
if (!a.All(char.IsDigit))
|
||||
throw new ArgumentException("First argument has to be a decimal string");
|
||||
return a.Select(ch => ch - '0').Aggregate((sum, n) => (sum * 10 + n) % b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user