uri class : Port getter

Description

Gets the port number of the URI.

Syntax

uriInstance.Port

Arguments

None.

Return value

ClassDescription
intThe port number of the URI.

Sample code

1:

uri u = new uri("http://www.example.com/aaa/bbb.html");

2:

int portNumber = u.Port;

Notes

It's a wrapper of the System.Uri.Port property.

Links for reference

Copyright © Cooker All rights reserved.