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
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.

C#
public HostString (string value);
C#
public HostString (string? value);

Parameters

value
String

Applies to

ASP.NET Core 9.0 ja muut versiot
Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

HostString(String, Int32)

Source:
HostString.cs
Source:
HostString.cs
Source:
HostString.cs

Creates a new HostString from its host and port parts.

C#
public HostString (string host, int port);

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

ASP.NET Core 9.0 ja muut versiot
Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0