public bool Equals(ArrayBounds other)
 {
     if (other == null)
     {
         return(false);
     }
     if ((other._lowerBounds == null ^
          this._lowerBounds == null))
     {
         return(false);
     }
     if ((other._upperBounds == null ^
          this._upperBounds == null))
     {
         return(false);
     }
     if (this._lowerBounds == null ||
         this._upperBounds == null)
     {
         return(false);
     }
     if (other._upperBounds.Length != this._upperBounds.Length ||
         other._lowerBounds.Length != this._lowerBounds.Length)
     {
         return(false);
     }
     int[] tLB = this._lowerBounds,
     oLB = other._lowerBounds,
     tUB = this._upperBounds,
     oUB = other._upperBounds;
     for (int i = 0; i < tLB.Length; i++)
     {
         if (tLB[i] != oLB[i])
         {
             return(false);
         }
     }
     for (int i = 0; i < tUB.Length; i++)
     {
         if (tUB[i] != oUB[i])
         {
             return(false);
         }
     }
     return(true);
 }
示例#2
0
 internal LengthCollection(ArrayBounds owner)
 {
     this.owner = owner;
 }