GE() 공개 정적인 메소드

public static GE ( byte A, byte B ) : bool
A byte
B byte
리턴 bool
예제 #1
0
        public IEnumerator <IPAddress> GetEnumerator()
        {
            var first = Begin.GetAddressBytes();
            var last  = End.GetAddressBytes();

            for (var ip = first; Bits.GE(ip, last); ip = Bits.Increment(ip))
            {
                yield return(new IPAddress(ip));
            }
        }
        public bool Contains(IPAddress ipaddress)
        {
            if (ipaddress.AddressFamily != this.Begin.AddressFamily)
            {
                return(false);
            }
            var adrBytes = ipaddress.GetAddressBytes();

            return(Bits.GE(this.Begin.GetAddressBytes(), adrBytes) && Bits.LE(this.End.GetAddressBytes(), adrBytes));
        }
        public bool Contains(IPAddressRange range)
        {
            if (this.Begin.AddressFamily != range.Begin.AddressFamily)
            {
                return(false);
            }

            return
                (Bits.GE(this.Begin.GetAddressBytes(), range.Begin.GetAddressBytes()) &&
                 Bits.LE(this.End.GetAddressBytes(), range.End.GetAddressBytes()));

            throw new NotImplementedException();
        }
예제 #4
0
        public bool Contains(IPAddress ipaddress)
        {
            if (ipaddress == null)
            {
                throw new ArgumentNullException("ipaddress");
            }

            if (ipaddress.AddressFamily != this.Begin.AddressFamily)
            {
                return(false);
            }
            var adrBytes = ipaddress.GetAddressBytes();

            return(Bits.GE(this.Begin.GetAddressBytes(), adrBytes) && Bits.LE(this.End.GetAddressBytes(), adrBytes));
        }