IPNetwork.Parse Method

Definition

Overloads

Parse(ReadOnlySpan<Char>)

Converts a CIDR character span to an IPNetwork instance.

Parse(String)

Converts a CIDR String to an IPNetwork instance.

Parse(ReadOnlySpan<Char>)

Source:
IPNetwork.cs
Source:
IPNetwork.cs

Converts a CIDR character span to an IPNetwork instance.

public:
 static System::Net::IPNetwork Parse(ReadOnlySpan<char> s);
public static System.Net.IPNetwork Parse (ReadOnlySpan<char> s);
static member Parse : ReadOnlySpan<char> -> System.Net.IPNetwork
Public Shared Function Parse (s As ReadOnlySpan(Of Char)) As IPNetwork

Parameters

s
ReadOnlySpan<Char>

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

Returns

An IPNetwork instance.

Exceptions

s is not a valid CIDR network string, or the address contains non-zero bits after the network prefix.

Applies to

Parse(String)

Source:
IPNetwork.cs
Source:
IPNetwork.cs

Converts a CIDR String to an IPNetwork instance.

public:
 static System::Net::IPNetwork Parse(System::String ^ s);
public static System.Net.IPNetwork Parse (string s);
static member Parse : string -> System.Net.IPNetwork
Public Shared Function Parse (s As String) As IPNetwork

Parameters

s
String

A String that defines an IP network in CIDR notation.

Returns

An IPNetwork instance.

Exceptions

The specified string is null.

s is not a valid CIDR network string, or the address contains non-zero bits after the network prefix.

Applies to