NetworkHelperIPRangeToCidr Method

Converts an IP address range to CIDR notation.

Namespace:  Dundas.BI.Utility
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
public static IReadOnlyCollection<(IPAddress StartIP, byte NumBits)> IPRangeToCidr(
	IPAddress startIP,
	IPAddress endIP
)

Parameters

startIP
Type: System.NetIPAddress
The starting value of the IP address range.
endIP
Type: System.NetIPAddress
The ending value of the IP address range.

Return Value

Type: IReadOnlyCollectionValueTupleIPAddress, Byte
A collection of IP addresses and the corresponding number of bits to consider, collectively representing the specified IP address range.
Exceptions
ExceptionCondition
ArgumentNullExceptionEither of the provided IP addresses is .
ArgumentExceptionThe address family of startIP does not match that of endIP.
See Also