6 writes to _size
System.Collections (6)
System\Collections\Generic\Stack.cs (6)
54_array = EnumerableHelpers.ToArray(collection, out _size); 77_size = 0; 235_size = size; 256_size = size; 275_size = size + 1; 291_size++;
27 references to _size
System.Collections (27)
System\Collections\Generic\Stack.cs (27)
57public int Count => _size; 75Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 93return _size != 0 && Array.LastIndexOf(_array, item, _size - 1) != -1; 106if (array.Length - arrayIndex < _size) 113int dstIndex = arrayIndex + _size; 114while (srcIndex < _size) 139if (array.Length - arrayIndex < _size) 146Array.Copy(_array, 0, array, arrayIndex, _size); 147Array.Reverse(array, arrayIndex, _size); 168if (_size < threshold) 170Array.Resize(ref _array, _size); 182ArgumentOutOfRangeException.ThrowIfLessThan(capacity, _size); 194int size = _size - 1; 207int size = _size - 1; 223int size = _size - 1; 246int size = _size - 1; 268int size = _size; 287Debug.Assert(_size == _array.Length); 288Grow(_size + 1); 289_array[_size] = item; 333if (_size == 0) 336T[] objArray = new T[_size]; 338while (i < _size) 340objArray[i] = _array[_size - i - 1]; 348Debug.Assert(_size == 0); 378_index = _stack._size - 1;