Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SocketPermissionAttribute.Port Property

Gets or sets the port number that is associated with this SocketPermissionAttribute.

Namespace: System.Net
Assembly: System (in system.dll)

'Declaration
Public Property Port As String
'Usage
Dim instance As SocketPermissionAttribute
Dim value As String

value = instance.Port

instance.Port = value
/** @property */
public String get_Port ()

/** @property */
public void set_Port (String value)

public function get Port () : String

public function set Port (value : String)

Not applicable.

Property Value

A string that contains the port number that is associated with this instance of SocketPermissionAttribute.
Exception typeCondition

ArgumentException

The Port property is a null reference (Nothing in Visual Basic) when you attempt to set the value. To specify more than one port, use an additional attribute declaration statement.

This property is write-once and specifies the port number to which this permission applies. The valid values are a string-encoded integer or the string "All".

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.