Public Function ContainsAddress(ByVal ip As Net.IPAddress) As Boolean
' Could just use ip.Address, but it's marked as Obsolete
Return ((BitConverter.ToInt32(HostAddress.GetAddressBytes, 0) And BitConverter.ToInt32(SubnetMask.GetAddressBytes, 0)) _
= (BitConverter.ToInt32(ip.GetAddressBytes, 0) And BitConverter.ToInt32(SubnetMask.GetAddressBytes, 0)))
End Function
|