IranIbanUtility 1.0.1

dotnet add package IranIbanUtility --version 1.0.1
                    
NuGet\Install-Package IranIbanUtility -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IranIbanUtility" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IranIbanUtility" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="IranIbanUtility" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IranIbanUtility --version 1.0.1
                    
#r "nuget: IranIbanUtility, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IranIbanUtility@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IranIbanUtility&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=IranIbanUtility&version=1.0.1
                    
Install as a Cake Tool

Tools to work with IBAN, BBAN, Their validation

امکانات کار با شماره شبا برای بانک های ایران

<br >

IBAN - شماره شبا

BBAN - شماره حساب

<br >

Functions

  • turnBbanIntoIban
  • turnIbanIntoBban
  • isIbanValid
  • tokenizeIban
  • isBankCodeValid
  • getBankNameFromIban
  • formatIban

<br >

isIbanValid

این تابع مشخص میکند که آیا شماره شبا معتبر است و یا خیر

turnBbanIntoIban

این تابع شماره حساب را به شماره شبا تبدیل میکند

bban: string

bankCode: string -- use enum BANK_COES for example BANK_CODES.TEJARAT

bbanType = "0" -- optional

0 یعنی حساب سپرده

1 یعنی حساب تسهیلات

countryCode = "IR" -- optional

<br >

example

var bban = "0351184689007"; var iban = TurnBbanIntoIban.Convert(bban, IranIbanEnums.BankCodes["MELLI"]); Console.WriteLine($"(done) bban: {bban} iban: {iban}");
tokenizeIban

یک آبجکت از ساختار سازنده شماره شبا در خروجی میدهد و اگر شماره شبا نا معتبر بود آبجکت خالی میدهد

It returns the tokenized iban via object or returns an empty object if iban was not valid

<br >

exmaple

var iban = "IR870570028180010653892101"; 
var tokenized = TokenizeIban.Tokenize(iban);
Console.WriteLine($"function tokenizedIban: [input] iban {iban} [result] Country={tokenized?.CountryCode}, CD={tokenized?.CD}, CC={tokenized?.CC}, bbanType = {tokenized?.BbanType}, BBAN={tokenized?.BBAN}");
// {
//  countryCode: "IR",
//  CD: "87",
//  CC: "057",
//  bbanType: "0",
//  BBAN: "028180010653892101"
// }
getBankNameFromIban

با توجه به شماره شبا نام فارسی بانک را بر می گرداند

<br >

example

var iban = "IR870180028180010653892101";
var farsiBankName = GetBankNameFromIban.GetName(iban);
// output: "بانک تجارت"
isBankCodeValid

این تابع مشخص میکند که آیا کد بانک معتبر است و یا خیر

you can get bank codes from enum BANK_CODES

example

var isValid = isBankCodeValid("018"); // 018 is BANK_CODES.TEJARAT
// output: true
formatIban

شماره شبا را به فرم استاندارد در خروجی می دهد

var iban = "IR870570028180010653892101";
var formattedIban = FormatIban.Format(iban);
// output: IR87 0570 0281 8001 0653 8921 01 

<br >

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 233 6/9/2025
1.0.0 224 6/9/2025