IPNetwork.TryParse(ReadOnlySpan<Char>, IPNetwork) 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, and returns a value
that indicates whether the conversion succeeded.
public static bool TryParse (ReadOnlySpan<char> networkSpan, out Microsoft.AspNetCore.HttpOverrides.IPNetwork? network);
static member TryParse : ReadOnlySpan<char> * IPNetwork -> bool
Public Shared Function TryParse (networkSpan As ReadOnlySpan(Of Char), ByRef network As IPNetwork) As Boolean
Parameters
- networkSpan
- ReadOnlySpan<Char>
The ReadOnlySpan<T> of char
to validate.
- network
- IPNetwork
When this method returns, contains the IPNetwork equivalent to the IP Address
and prefix length contained in networkSpan
, if the conversion succeeded,
or null
if the conversion failed. This parameter is passed uninitialized.
Returns
true
if the networkSpan
parameter was
converted successfully; otherwise false
.