Skip to content
skwasjer edited this page Aug 10, 2020 · 13 revisions

To convert an Iban type to a string, call the ToString(IbanNet.IbanFormats format) method:

Format Example
Electronic (default) NL91ABNA0417164300
Print NL91 ABNA 0417 1643 00
Obfuscated XXXXXXXXXXXXXXXX4300

Example

IIbanParser parser = new IbanParser(new IbanValidator());
Iban iban = parser.Parse("NL91 ABNA 0417 1643 00");
Debug.WriteLine(iban.ToString(IbanFormat.Obfuscated));  // XXXXXXXXXXXXXXXX4300

By convention, it is recommended to use the flat format when persisting an IBAN in a database, file or otherwise.