Megosztás a következőn keresztül:


PhoneNumberInfo Class

Definition

Information about a phone number.

public ref class PhoneNumberInfo sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Globalization.PhoneNumberFormatting.IPhoneNumberInfoFactory, 196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PhoneNumberInfo final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Globalization.PhoneNumberFormatting.IPhoneNumberInfoFactory), 196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PhoneNumberInfo : IStringable
function PhoneNumberInfo(number)
Public NotInheritable Class PhoneNumberInfo
Implements IStringable
Inheritance
Object Platform::Object IInspectable PhoneNumberInfo
Attributes
Implements

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Constructors

PhoneNumberInfo(String)

Constructor.

Properties

CountryCode

Gets the two-letter country code for this phone number.

PhoneNumber

Gets the phone number.

Methods

CheckNumberMatch(PhoneNumberInfo)

Compares two PhoneNumberInfo objects.

GetGeographicRegionCode()

Gets the geographic region code for this number.

GetLengthOfGeographicalAreaCode()

Gets the length in characters of the geographical area code.

GetLengthOfNationalDestinationCode()

Gets the length, in characters, of the national destination code.

GetNationalSignificantNumber()

Gets the national significant number of this object.

PredictNumberKind()

Heuristically predicts what kind of number is represented in this object.

ToString()

Renders the phone number as a string.

TryParse(String, PhoneNumberInfo)

Static method that attempts to parse a given input string as a phone number, and creates a PhoneNumberInfo encapsulating it.

TryParse(String, String, PhoneNumberInfo)

Static method that attempts to parse a given input string as a phone number (using a given region code) and creates a PhoneNumberInfo encapsulating it.

Applies to

See also