Edit

Share via


IPNetwork.TryParse Method

Definition

Overloads

TryParse(ReadOnlySpan<Byte>, IPNetwork)

Converts the specified UTF-8 CIDR character span to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

TryParse(String, IPNetwork)

Converts the specified CIDR string to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

TryParse(ReadOnlySpan<Char>, IPNetwork)

Converts the specified CIDR character span to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

TryParse(ReadOnlySpan<Byte>, IPNetwork)

Source:
IPNetwork.cs

Converts the specified UTF-8 CIDR character span to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

public:
 static bool TryParse(ReadOnlySpan<System::Byte> utf8Text, [Runtime::InteropServices::Out] System::Net::IPNetwork % result);
public static bool TryParse(ReadOnlySpan<byte> utf8Text, out System.Net.IPNetwork result);
static member TryParse : ReadOnlySpan<byte> * IPNetwork -> bool
Public Shared Function TryParse (utf8Text As ReadOnlySpan(Of Byte), ByRef result As IPNetwork) As Boolean

Parameters

utf8Text
ReadOnlySpan<Byte>

A UTF-8 character span that defines an IP network in CIDR notation.

result
IPNetwork

When the method returns, contains an IPNetwork instance if the conversion succeeds.

Returns

true if the conversion was successful; otherwise, false.

Applies to

TryParse(String, IPNetwork)

Source:
IPNetwork.cs
Source:
IPNetwork.cs
Source:
IPNetwork.cs

Converts the specified CIDR string to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

public:
 static bool TryParse(System::String ^ s, [Runtime::InteropServices::Out] System::Net::IPNetwork % result);
public static bool TryParse(string? s, out System.Net.IPNetwork result);
static member TryParse : string * IPNetwork -> bool
Public Shared Function TryParse (s As String, ByRef result As IPNetwork) As Boolean

Parameters

s
String

A String that defines an IP network in CIDR notation.

result
IPNetwork

When the method returns, contains an IPNetwork instance if the conversion succeeds.

Returns

true if the conversion was successful; otherwise, false.

Applies to

TryParse(ReadOnlySpan<Char>, IPNetwork)

Source:
IPNetwork.cs
Source:
IPNetwork.cs
Source:
IPNetwork.cs

Converts the specified CIDR character span to an IPNetwork instance and returns a value indicating whether the conversion succeeded.

public:
 static bool TryParse(ReadOnlySpan<char> s, [Runtime::InteropServices::Out] System::Net::IPNetwork % result);
public static bool TryParse(ReadOnlySpan<char> s, out System.Net.IPNetwork result);
static member TryParse : ReadOnlySpan<char> * IPNetwork -> bool
Public Shared Function TryParse (s As ReadOnlySpan(Of Char), ByRef result As IPNetwork) As Boolean

Parameters

s
ReadOnlySpan<Char>

A String that defines an IP network in CIDR notation.

result
IPNetwork

When the method returns, contains an IPNetwork instance if the conversion succeeds.

Returns

true if the conversion was successful; otherwise, false.

Applies to