PhoneNumberInfo 類別

定義

電話號碼的相關資訊。

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
繼承
Object Platform::Object IInspectable PhoneNumberInfo
屬性
實作

Windows 需求

裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v3.0 引進)

建構函式

PhoneNumberInfo(String)

建構函式。

屬性

CountryCode

取得此電話號碼的兩個字母國家/地區代碼。

PhoneNumber

取得電話號碼。

方法

CheckNumberMatch(PhoneNumberInfo)

比較兩個 PhoneNumberInfo 物件。

GetGeographicRegionCode()

取得這個數位的地理區功能變數代碼。

GetLengthOfGeographicalAreaCode()

取得地理區功能變數代碼字元的長度。

GetLengthOfNationalDestinationCode()

取得國家/地區目的地代碼的長度,以字元為單位。

GetNationalSignificantNumber()

取得這個 物件的國家/地區顯著數目。

PredictNumberKind()

啟發學習法會預測這個 物件中代表的數位種類。

ToString()

將電話號碼轉譯為字串。

TryParse(String, PhoneNumberInfo)

嘗試將指定輸入字串剖析為電話號碼的靜態方法,並建立將它封裝的 PhoneNumberInfo

TryParse(String, String, PhoneNumberInfo)

靜態方法,嘗試使用指定的區功能變數代碼) 將指定的輸入字串剖析為電話號碼 (,並建立將它封裝的 PhoneNumberInfo

適用於

另請參閱