Exemplo n.º 1
0
 public IPAddress this[BigInteger i] {
     get {
         if (i >= this.Count)
         {
             throw new ArgumentOutOfRangeException("i");
         }
         byte width = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128;
         IPNetworkCollection ipn = this._ipnetwork.Subnet(width);
         return(ipn[i].Network);
     }
 }
Exemplo n.º 2
0
        public IPAddress this[BigInteger i] {
            get {
                if (i >= this.Count)
                {
                    throw new ArgumentOutOfRangeException("i");
                }
                byte width = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128;
                IPNetworkCollection ipn = this._ipnetwork.Subnet(width);

                BigInteger index = i;
                if (this._filter == FilterEnum.Usable)
                {
                    index++;
                }
                return(ipn[index].Network);
            }
        }