MatinDevs.PersianPhoneNumbers
1.1.0
See the version list below for details.
dotnet add package MatinDevs.PersianPhoneNumbers --version 1.1.0
NuGet\Install-Package MatinDevs.PersianPhoneNumbers -Version 1.1.0
<PackageReference Include="MatinDevs.PersianPhoneNumbers" Version="1.1.0" />
paket add MatinDevs.PersianPhoneNumbers --version 1.1.0
#r "nuget: MatinDevs.PersianPhoneNumbers, 1.1.0"
// Install MatinDevs.PersianPhoneNumbers as a Cake Addin #addin nuget:?package=MatinDevs.PersianPhoneNumbers&version=1.1.0 // Install MatinDevs.PersianPhoneNumbers as a Cake Tool #tool nuget:?package=MatinDevs.PersianPhoneNumbers&version=1.1.0
Persian Phone Numbers for .NET
The MatinDevs.PersianPhoneNumbers
library provides a C# class, PersianPhone
, designed to handle Persian phone numbers. This class facilitates the conversion of Persian digits to English equivalents, validation of phone number formats according to Persian mobile phone standards, and implicit conversion from a string to a PersianPhone
object.
Usage
To use the PersianPhone
class, simply instantiate it with a Persian phone number:
string persianNumber = "۰۹۱۲۳۴۵۶۷۸۹";
PersianPhone phone = new PersianPhone(persianNumber);
Console.WriteLine(phone.Value); // Output: 09123456789
The Value
property of the PersianPhone
object contains the converted phone number in English digits.
Installation
This library can be easily installed via NuGet. Add the following package reference to your project file:
<PackageReference Include="MatinDevs.PersianPhoneNumbers" Version="1.0.0" />
License
This library is licensed under the MIT License.
Links
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.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.