7 writes to _size
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (7)
158return _size++; 217_size = 0; 228la._size = _size; 395_size++; 423_size += count; 518_size--; 539_size -= count;
61 references to _size
System.Private.CoreLib (61)
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (61)
76if (value < _size) 88if (_size > 0) 90Array.Copy(_items, newItems, _size); 103public virtual int Count => _size; 123if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 128if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 155if (_size == _items.Length) EnsureCapacity(_size + 1); 156_items[_size] = value; 167InsertRange(_size, c); 194if (_size - index < count) 214if (_size > 0) 216Array.Clear(_items, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 227ArrayList la = new ArrayList(_size); 228la._size = _size; 230Array.Copy(_items, la._items, _size); 239public virtual bool Contains(object? item) => Array.IndexOf(_items, item, 0, _size) >= 0; 255Array.Copy(_items, 0, array!, arrayIndex, _size); 264if (_size - index < count) 329if (_size - index < count) 344return Array.IndexOf((Array)_items, value, 0, _size); 358if (startIndex > _size) 360return Array.IndexOf((Array)_items, value, startIndex, _size - startIndex); 374if (startIndex > _size) 376if (count < 0 || startIndex > _size - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); 387if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 389if (_size == _items.Length) EnsureCapacity(_size + 1); 390if (index < _size) 392Array.Copy(_items, index, _items, index + 1, _size - index); 408if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 413EnsureCapacity(_size + count); 415if (index < _size) 417Array.Copy(_items, index, _items, index + count, _size - index); 438return LastIndexOf(value, _size - 1, _size); 452if (startIndex >= _size) 474if (_size == 0) // Special case for an empty list 477if (startIndex >= _size || count > startIndex + 1) 478throw new ArgumentOutOfRangeException(startIndex >= _size ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_BiggerThanCollection); 516if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 519if (index < _size) 521Array.Copy(_items, index + 1, _items, index, _size - index); 523_items[_size] = null; 533if (_size - index < count) 538int i = _size; 540if (index < _size) 542Array.Copy(_items, index + count, _items, index, _size - index); 544while (i > _size) _items[--i] = null; 579if (_size - index < count) 594if (index < 0 || index > _size - count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 607if (_size - index < count) 638if (_size - index < count) 667if (_size == 0) 670object?[] array = new object[_size]; 671Array.Copy(_items, array, _size); 685Array array = Array.CreateInstance(type, _size); 686Array.Copy(_items, array, _size); 701Capacity = _size; 2579if (_index < _list._size - 1) 2587_index = _list._size;