Redigeeri

Jagamisviis:


IPNetwork.TryParse Method

Definition

Overloads

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(String, IPNetwork)

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

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