Class IPAddressHelper
- Namespace
- SunamoInterfaces.Interfaces
- Assembly
- SunamoInterfaces.dll
Helper class for IP address operations.
public class IPAddressHelper
- Inheritance
-
IPAddressHelper
- Inherited Members
- Extension Methods
Methods
GetIPAddressInArray(string)
Gets IP address as byte array. Returns null if anything doesn't match.
public static byte[]? GetIPAddressInArray(string ipAddress)
Parameters
ipAddressstringIP address string to parse.
Returns
- byte[]
Byte array representing the IP address, or null if parsing fails.
IsIpAddress(string)
Determines whether the specified string is an IP address.
public static bool? IsIpAddress(string ipAddress)
Parameters
ipAddressstringThe string to check.
Returns
- bool?
True if IPv4, false if IPv6, null if not an IP address.