語言

SocketPermissionAttribute.Port 屬性

定義

取得或設定與此 SocketPermissionAttribute相關聯的埠號。

public:
 property System::String ^ Port { System::String ^ get(); void set(System::String ^ value); };
public string Port { get; set; }
member this.Port : string with get, set
Public Property Port As String

屬性值

一個包含與此實例 SocketPermissionAttribute相關聯的埠號的字串。

例外狀況

屬性 Portnull 你嘗試設定價值的時候。 若要指定多個埠,請使用額外的屬性宣告語句。

備註

此屬性為寫入一次,並指定此權限適用的埠號。 有效的值是字串編碼的整數或字串「All」。

適用於