共用方式為


PhoneCall.PhoneNumber 屬性

定義

取得或設定代表電話號碼的字串。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

public:
 property System::String ^ PhoneNumber { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string PhoneNumber { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.PhoneNumber : string with get, set
Public Property PhoneNumber As String

屬性值

字串,代表電話號碼。

屬性

例外狀況

數字的格式無效。

備註

控制件 PhoneNumberPhoneCall 需要 屬性。 屬性 PhoneNumber 接受各種格式的字串。 下列數字類型的格式是使用 Backus-Naur Format (BNF 語法來描述的檔案格式) :

phone_number ::= international_number | national_number | short_number  

international_number ::= "+" country_code national_number  

short_number ::= "#" national_number  

country_code ::= (decoration_character | digit)* digit (decoration_character   
       | digit)*  

national_number ::= (decoration_character | digit)+  

digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  

decoration_character ::= "(" | ")" | "." | "-" | {space}  

電話號碼可以包含選擇性的國家/地區代碼,前面加上 + 符號,後面接著構成電話號碼的任何號碼序列。 標示為 decoration_character 的字元可以出現在電話號碼中的任何位置,並會被忽略。

針對 i-Mode 手機,指定電話號碼時,目前適用下列規則:

  • 字串的開頭必須是 「0」 或 「#」。

  • 如果字串以 「0」 開頭,則數位會超過九位數。

  • 如果字串開頭為 “#”,則數位會超過三位數。

  • 這些數位可以在字串中包含 「 (」、“) ” 和 “-”。

  • 字串必須少於 24 個字元。

下列清單顯示有效電話號碼的一些範例:

  • 800.522.2920

  • +1 (425) 885-8080

  • +91335303197

適用於

另請參閱