Esempio n. 1
0
 internal ArraySegmentEnumerator(ZArraySegment <T> arraySegment)
 {
     this._array   = arraySegment._array;
     this._start   = arraySegment._offset;
     this._end     = this._start + arraySegment._count;
     this._current = this._start - 1;
 }
Esempio n. 2
0
 /// <summary>Determines whether the specified <see cref="T:System.ArraySegment`1" /> structure is equal to the current instance.</summary>
 /// <param name="obj">The structure to compare with the current instance.</param>
 /// <returns>
 /// <see langword="true" /> if the specified <see cref="T:System.ArraySegment`1" /> structure is equal to the current instance; otherwise, <see langword="false" />.</returns>
 public bool Equals(ZArraySegment <T> obj)
 {
     if (obj._array == this._array && obj._offset == this._offset)
     {
         return(obj._count == this._count);
     }
     return(false);
 }