IPNetwork.Parse(ReadOnlySpan<Char>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.