Export (0) Print
Expand All

UriBuilder.Port Property

Gets or sets the port number of the URI.

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

public int Port { get; set; }

Property Value

Type: System.Int32
The port number of the URI.

ExceptionCondition
ArgumentOutOfRangeException

The port number cannot be set to less than 0 or greater than 65,535.

The port number defines the protocol port for contacting the server referenced in the URI. If a port is not specified as part of the URI, the Port property returns the value -1 to indicate that the server uses the default value for the protocol.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft