Geeks With Blogs

Programmers are tools for converting caffeine into code.

dotNed blogger

Bob Goedkoop Programming C# on Microsoft's .NET plaform IBAN
Mod 97
Technorati Tags: .NET,C#,IBAN,SEPA,Mod97 For my current project we need to validate IBAN numbers. IBAN numbers are validated with an ISO 7064 mod-97-10 calculation where the remainder must equal 1 static public bool Validate(string iban) { // pre-conditions if ( string.IsNullOrEmpty( iban ) || (!Regex.IsMatch(iban, "^[A-Z0-9]") ) ) { return false; } // clean-up IBAN iban = iban.Replace(" ", String.Empty); // 1.Move the four initial characters to the end of the string string iban2 = iban.Substring(4, ......

Posted On Thursday, July 4, 2013 1:25 PM

Copyright © Bob Goedkoop | Powered by: