-
Notifications
You must be signed in to change notification settings - Fork 33
Formatting an IBAN
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 |
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.