Banco banco = new BancoDoBrasil(); // instantiate a Banco instance for Banco do Brasil Boleto boleto = new Boleto(DateTime.Now, 2.50m, "1234567890", "12345678", "12345678901234567", banco); // create a new boleto string codigoBarras = boleto.CodigoBarra; // get the barcode string for the boleto
Banco banco = new Caixa(); // instantiate a Banco instance for Caixa Econômica Federal IBoleto boleto = banco.Formata(“10491832000001000130550001020350000300104001”); // create a IBoleto instance based on a barcode bool isValid = boleto.Validar(); // validate the boleto digitPackage library: BoletoNet (version 0.0.15.1) is available on NuGet, a package manager for .NET, and can be installed using the NuGet package manager built into Visual Studio or by running the following command in the Package Manager Console: Install-Package BoletoNet.