public static BitArray GetHostBits(this SubnetIpAddress ipaddress) { return(Utils.GetHostBits( ipaddress.GetAddressBits(), ipaddress.subnetMask.GetNetworkPrefixLength() )); }
public static bool IsInSameSubnet(SubnetIpAddress reference, IPAddress comparison) { if (reference.AddressFamily != comparison.AddressFamily) { throw new ArgumentException("reference and comparison IP addresses are not of same address family"); } byte[] refBytes = reference.GetAddressBytes(); byte[] compBytes = comparison.GetAddressBytes(); //TODO return(true); }