6 writes to _array
System.Collections (6)
System\Collections\Generic\Stack.cs (6)
37
_array
= Array.Empty<T>();
45
_array
= new T[capacity];
54
_array
= EnumerableHelpers.ToArray(collection, out _size);
170
Array.Resize(ref
_array
, _size);
187
Array.Resize(ref
_array
, capacity);
327
Array.Resize(ref
_array
, newcapacity);
23 references to _array
System.Collections (23)
System\Collections\Generic\Stack.cs (23)
63
public int Capacity =>
_array
.Length;
75
Array.Clear(
_array
, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references.
93
return _size != 0 && Array.LastIndexOf(
_array
, item, _size - 1) != -1;
111
Debug.Assert(array !=
_array
);
116
array[--dstIndex] =
_array
[srcIndex++];
146
Array.Copy(
_array
, 0, array, arrayIndex, _size);
167
int threshold = (int)(
_array
.Length * 0.9);
184
if (capacity ==
_array
.Length)
195
T[] array =
_array
;
208
T[] array =
_array
;
224
T[] array =
_array
;
247
T[] array =
_array
;
269
T[] array =
_array
;
287
Debug.Assert(_size ==
_array
.Length);
289
_array
[_size] = item;
305
if (
_array
.Length < capacity)
310
return
_array
.Length;
315
Debug.Assert(
_array
.Length < capacity);
317
int newcapacity =
_array
.Length == 0 ? DefaultCapacity : 2 *
_array
.Length;
340
objArray[i] =
_array
[_size - i - 1];
381
_currentElement = _stack.
_array
[_index];
391
_currentElement = _stack.
_array
[_index];