Class IPAddressExtensions
Extension methods for
Inheritance
System.Object
IPAddressExtensions
Namespace: X10D.Net
Assembly: X10D.dll
Syntax
public static class IPAddressExtensions : object
Methods
| Improve this Doc View SourceIsIPv4(IPAddress)
Returns a value indicating whether the specified IP address is a valid IPv4 address.
Declaration
public static bool IsIPv4(this IPAddress address)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address | The IP address to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified IP address is a valid IPv4 address; otherwise, false. |
IsIPv6(IPAddress)
Returns a value indicating whether the specified IP address is a valid IPv6 address.
Declaration
public static bool IsIPv6(this IPAddress address)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address | The IP address to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified IP address is a valid IPv6 address; otherwise, false. |