IPAddress.IParsable<IPAddress>.TryParse Method

Definition

Tries to parse a string into an IPAddress.

C#
static bool IParsable<IPAddress>.TryParse(string s, IFormatProvider provider, out System.Net.IPAddress result);

Parameters

s
String

The string to parse.

provider
IFormatProvider

An object that provides culture-specific formatting information about s.

result
IPAddress

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

true if s was successfully parsed; otherwise, false.

Applies to

Product Versions
.NET 8, 9, 10