System.Runtime.CompilerServices.ReadOnlyCollectionBuilder.this C# (CSharp) Méthode

this() public méthode

Gets or sets the element at the specified index.
public this ( int index ) : T
index int The zero-based index of the element to get or set.
Résultat T
        public T this[int index]
        {
            get
            {
                if (index >= _size)
                    throw new ArgumentOutOfRangeException(nameof(index));

                return _items[index];
            }
            set
            {
                if (index >= _size)
                    throw new ArgumentOutOfRangeException(nameof(index));

                _items[index] = value;
                _version++;
            }
        }

Same methods

ReadOnlyCollectionBuilder::this ( int index ) : object?IList.System.Collections