Exemplo n.º 1
0
        public IpAddress AndAddress(IpAddress Ip, SubnetMask Subnetmask)
        {
            AddressParser Parser = new AddressParser();
            byte[] AndedAddress = new byte[4];

            for (int i = 0; i < Ip.AddressArray.Length; i++)
            {
                AndedAddress[i] = (byte)(Ip.AddressArray[i] & Subnetmask.AddressArray[i]);
            }

            IpAddress ReturnAddress = new IpAddress(AndedAddress);
            return ReturnAddress;
        }
Exemplo n.º 2
0
        public IpAddress AndAddress(IpAddress Ip, SubnetMask Subnetmask)
        {
            AddressParser Parser = new AddressParser();

            byte[] AndedAddress = new byte[4];


            for (int i = 0; i < Ip.AddressArray.Length; i++)
            {
                AndedAddress[i] = (byte)(Ip.AddressArray[i] & Subnetmask.AddressArray[i]);
            }

            IpAddress ReturnAddress = new IpAddress(AndedAddress);

            return(ReturnAddress);
        }