UriBuilder.Port Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the port number of the URI.
Assembly: System (in System.dll)
| Exception | Condition |
|---|---|
| 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.
Show: