Share via


PhoneNumberFormatter.Format Method

Definition

Overloads

Format(PhoneNumberInfo)

Returns a string representation of the provided phone number.

Format(PhoneNumberInfo, PhoneNumberFormat)

Returns a string representing the given phone number, using the given format.

Format(PhoneNumberInfo)

Returns a string representation of the provided phone number.

public:
 virtual Platform::String ^ Format(PhoneNumberInfo ^ number) = Format;
/// [Windows.Foundation.Metadata.Overload("Format")]
winrt::hstring Format(PhoneNumberInfo const& number);
[Windows.Foundation.Metadata.Overload("Format")]
public string Format(PhoneNumberInfo number);
function format(number)
Public Function Format (number As PhoneNumberInfo) As String

Parameters

number
PhoneNumberInfo

The phone number to be formatted. The PhoneNumberInfo specifies not just the subscriber number, but also other relevant information such as country code.

Returns

String

Platform::String

winrt::hstring

A string containing the formatted phone number, using the default format for the region specified when this PhoneNumberFormatter was created.

Attributes

See also

Applies to

Format(PhoneNumberInfo, PhoneNumberFormat)

Returns a string representing the given phone number, using the given format.

public:
 virtual Platform::String ^ Format(PhoneNumberInfo ^ number, PhoneNumberFormat numberFormat) = Format;
/// [Windows.Foundation.Metadata.Overload("FormatWithOutputFormat")]
winrt::hstring Format(PhoneNumberInfo const& number, PhoneNumberFormat const& numberFormat);
[Windows.Foundation.Metadata.Overload("FormatWithOutputFormat")]
public string Format(PhoneNumberInfo number, PhoneNumberFormat numberFormat);
function format(number, numberFormat)
Public Function Format (number As PhoneNumberInfo, numberFormat As PhoneNumberFormat) As String

Parameters

number
PhoneNumberInfo

The phone number to be formatted. The PhoneNumberInfo specifies not just the subscriber number, but also other relevant information such as country code.

numberFormat
PhoneNumberFormat

The specific format to be used.

Returns

String

Platform::String

winrt::hstring

A string containing the phone number, in the specified format.

Attributes

See also

Applies to