public ArraySlice(ArraySlice <T> slice, int offset, int count) : this(slice.Array, slice.Offset + offset, count) { if (slice.Length - offset < count) { throw new ArgumentException("Slices created from other slices must be contained in the source slice. The length of the slice cannot be less than 0."); } #if !NET35 Contract.EndContractBlock(); #endif }
public ArraySlice(ArraySlice <T> slice) : this(slice.Array, slice.Offset, slice.Length) { }
public bool Equals(ArraySlice <T> obj) { return(obj.Array == Array && obj.Offset == Offset && obj.Length == Length); }