コード例 #1
0
        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
        }
コード例 #2
0
 public ArraySlice(ArraySlice <T> slice)
     : this(slice.Array, slice.Offset, slice.Length)
 {
 }
コード例 #3
0
 public bool Equals(ArraySlice <T> obj)
 {
     return(obj.Array == Array && obj.Offset == Offset && obj.Length == Length);
 }