PhoneFormatHelper Class
Assembly: PTS.Globalization.dll
public static class PhoneFormatHelper
Inheritance
System.Object
PhoneFormatHelper
Methods
Declaration
public static string FormatPhoneNumber(string input, CountryCode country, bool internationalFormat = true)
Parameters
Type |
Name |
Description |
System.String |
input |
|
CountryCode |
country |
|
System.Boolean |
internationalFormat |
|
Returns
Type |
Description |
System.String |
|
Determines whether phone number is valid international phone number.
Declaration
public static bool IsValidPhoneNumber(string phone)
Parameters
Type |
Name |
Description |
System.String |
phone |
The phone number.
|
Returns
Type |
Description |
System.Boolean |
|
Determines whether phone number is valid for specific country.
Declaration
public static bool IsValidPhoneNumber(string phone, CountryCode country)
Parameters
Type |
Name |
Description |
System.String |
phone |
The phone.
|
CountryCode |
country |
The country.
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static CountryCode PhonePrefixToCountry(ushort prefix)
Parameters
Type |
Name |
Description |
System.UInt16 |
prefix |
|
Returns
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()