Electronic Funds Transfer Routing Number Check
Category:
C#, VB.NET, ASP.NETType:
SnippetsDifficulty:
BeginningAuthor:
AnonymousVersion Compatibility: Visual Basic 6, Visual Basic 5, Visual Basic.NET
More information:
The check digit scheme used on routing numbers for Electronic Funds Transfer (EFT) between banks uses a 9-digit number with position weightings of 3, 7, and 1. The check equation for a number a1a2a3a4a5a6a7a8a9 is
3a1 + 7a2 + a3 + 3a4 + 7a5 + a6 + 3a7 + 7 a8 + a9 mod 10 = 0
This scheme is based on the fact that multiplication modulo 10 yields a permutation of all 10 decimal digits if the multiplication factor is one of the digits 1, 3, 7, or 9, but only a subset of the decimal digits if the factor is 5 or an even digit.
This scheme cannot detect adjacent transpositions of digits that differ by 5.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: