IPNetwork.Parse 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.
Overloads
Parse(ReadOnlySpan<Char>) |
Converts a CIDR character span to an IPNetwork instance. |
Parse(String) |
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
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
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.