Share via


IPNetwork.Parse(ReadOnlySpan<Char>) Method

Definition

Converts the specified ReadOnlySpan<T> of char representation of an IP address and a prefix length to its IPNetwork equivalent.

public static Microsoft.AspNetCore.HttpOverrides.IPNetwork Parse (ReadOnlySpan<char> networkSpan);
static member Parse : ReadOnlySpan<char> -> Microsoft.AspNetCore.HttpOverrides.IPNetwork
Public Shared Function Parse (networkSpan As ReadOnlySpan(Of Char)) As IPNetwork

Parameters

networkSpan
ReadOnlySpan<Char>

The ReadOnlySpan<T> of char to convert, in CIDR notation.

Returns

The IPNetwork equivalent to the IP address and prefix length contained in networkSpan.

Exceptions

networkSpan is not in the correct format.

The prefix length contained in networkSpan is out of range.

Applies to