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关联的端口号。

例外

Port 属性是在 null 尝试设置值时。 若要指定多个端口,请使用其他属性声明语句。

注解

此属性是写入一次,并指定此权限应用到的端口号。 有效值为字符串编码的整数或字符串“All”。

适用于