Skip to content
skwasjer edited this page Aug 25, 2021 · 8 revisions

The Iban type exposes several convenience properties to extract components of an IBAN.

IbanParser parser = new IbanParser(new IbanValidator());
Iban iban = parser.Parse("GB29NWBK60161331926819");

Console.WriteLine(iban.Country.TwoLetterISORegionName);  // GB
Console.WriteLine(iban.Bban);                            // NWBK60161331926819
Console.WriteLine(iban.BankIdentifier);                  // NWBK
Console.WriteLine(iban.BranchIdentifier);                // 601613

Note that BankIdentifier and BranchIdentifier are not supported for all countries and registry providers, in which case null will be returned.