Table of Contents

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

ipAddress string

IP 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

ipAddress string

The string to check.

Returns

bool?

True if IPv4, false if IPv6, null if not an IP address.