Port Property

UriBuilder.Port Property

Gets or sets the port number of the URI.

[Visual Basic]
Public Property Port As Integer
public int Port {get; set;}
public: __property int get_Port();
public: __property void set_Port(int);
public function get Port() : int;
public function set Port(int);

Property Value

The port number of the URI.


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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

UriBuilder Class | UriBuilder Members | System Namespace

© 2015 Microsoft