System.UriComponents.HostAndPort Field

The Uri.Host and Uri.Port data. If no port data is in the Uri and a default port has been assigned to the Uri.Scheme, the default port is returned. If there is no default port, -1 is returned.

Syntax

UriComponents HostAndPort

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0