HostString Constructors

Definition

Overloads

HostString(String)

Creates a new HostString without modification. The value should be Unicode rather than punycode, and may have a port. IPv4 and IPv6 addresses are also allowed, and also may have ports.

HostString(String, Int32)

Creates a new HostString from its host and port parts.

HostString(String)

Source:
HostString.cs
Source:
HostString.cs

Creates a new HostString without modification. The value should be Unicode rather than punycode, and may have a port. IPv4 and IPv6 addresses are also allowed, and also may have ports.

public:
 HostString(System::String ^ value);
public HostString (string value);
new Microsoft.AspNetCore.Http.HostString : string -> Microsoft.AspNetCore.Http.HostString
Public Sub New (value As String)

Parameters

value
String

Applies to

HostString(String, Int32)

Source:
HostString.cs
Source:
HostString.cs

Creates a new HostString from its host and port parts.

public:
 HostString(System::String ^ host, int port);
public HostString (string host, int port);
new Microsoft.AspNetCore.Http.HostString : string * int -> Microsoft.AspNetCore.Http.HostString
Public Sub New (host As String, port As Integer)

Parameters

host
String

The value should be Unicode rather than punycode. IPv6 addresses must use square braces.

port
Int32

A positive, greater than 0 value representing the port in the host string.

Applies to