9 [__DynamicallyInvokable]
27 if (_current < _start)
35 return _array[_current];
49 _array = arraySegment._array;
50 _start = arraySegment._offset;
51 _end = _start + arraySegment._count;
52 _current = _start - 1;
55 public bool MoveNext()
60 return _current < _end;
67 _current = _start - 1;
83 [__DynamicallyInvokable]
86 [__DynamicallyInvokable]
95 [__DynamicallyInvokable]
98 [__DynamicallyInvokable]
107 [__DynamicallyInvokable]
110 [__DynamicallyInvokable]
123 [__DynamicallyInvokable]
126 [__DynamicallyInvokable]
133 if (index < 0 || index >= _count)
137 return _array[_offset + index];
139 [__DynamicallyInvokable]
146 if (index < 0 || index >= _count)
150 _array[_offset + index] = value;
160 [__DynamicallyInvokable]
163 [__DynamicallyInvokable]
170 if (index < 0 || index >= _count)
174 return _array[_offset + index];
181 [__DynamicallyInvokable]
184 [__DynamicallyInvokable]
195 [__DynamicallyInvokable]
204 _count = array.Length;
217 [__DynamicallyInvokable]
232 if (array.Length - offset < count)
243 [__DynamicallyInvokable]
248 return _array.GetHashCode() ^ _offset ^ _count;
257 [__DynamicallyInvokable]
271 [__DynamicallyInvokable]
274 if (obj._array == _array && obj._offset == _offset)
276 return obj._count == _count;
286 [__DynamicallyInvokable]
297 [__DynamicallyInvokable]
306 [__DynamicallyInvokable]
313 int num =
System.
Array.IndexOf(_array, item, _offset, _count);
318 return num - _offset;
327 [__DynamicallyInvokable]
338 [__DynamicallyInvokable]
347 [__DynamicallyInvokable]
355 [__DynamicallyInvokable]
365 [__DynamicallyInvokable]
372 int num =
System.
Array.IndexOf(_array, item, _offset, _count);
385 [__DynamicallyInvokable]
400 [__DynamicallyInvokable]
408 [__DynamicallyInvokable]
415 return new ArraySegmentEnumerator(
this);
420 [__DynamicallyInvokable]
427 return new ArraySegmentEnumerator(
this);
bool Equals(ArraySegment< T > obj)
Determines whether the specified T:System.ArraySegment`1 structure is equal to the current instance.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
void Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
static bool operator==(ArraySegment< T > a, ArraySegment< T > b)
Indicates whether two T:System.ArraySegment`1 structures are equal.
Represents a non-generic collection of objects that can be individually accessed by index.
void RemoveAt(int index)
Removes the T:System.Collections.IList item at the specified index.
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
void Insert(int index, object value)
Inserts an item to the T:System.Collections.IList at the specified index.
The exception that is thrown when the value of an argument is outside the allowable range of values a...
int Offset
Gets the position of the first element in the range delimited by the array segment,...
Represents a strongly-typed, read-only collection of elements.
int IndexOf(object value)
Determines the index of a specific item in the T:System.Collections.IList.
Represents a read-only collection of elements that can be accessed by index.
override int GetHashCode()
Returns the hash code for the current instance.
override bool Equals(object obj)
Determines whether the specified object is equal to the current instance.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
Provides information about, and means to manipulate, the current environment and platform....
object Current
Gets the element in the collection at the current position of the enumerator.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
ArraySegment(T[] array, int offset, int count)
Initializes a new instance of the T:System.ArraySegment`1 structure that delimits the specified range...
IEnumerator GetEnumerator()
Returns an enumerator that iterates through a collection.
ArraySegment(T[] array)
Initializes a new instance of the T:System.ArraySegment`1 structure that delimits all the elements in...
The exception that is thrown when one of the arguments provided to a method is not valid.
int Count
Gets the number of elements in the range delimited by the array segment.
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
static bool operator !=(ArraySegment< T > a, ArraySegment< T > b)
Indicates whether two T:System.ArraySegment`1 structures are unequal.
Specifies that the class can be serialized.
The exception that is thrown when a method call is invalid for the object's current state.
The exception that is thrown when an invoked method is not supported, or when there is an attempt to ...
Defines size, enumerators, and synchronization methods for all nongeneric collections.
void CopyTo(Array array, int index)
Copies the elements of the T:System.Collections.ICollection to an T:System.Array, starting at a parti...
Supports a simple iteration over a non-generic collection.
Delimits a section of a one-dimensional array.