Exemplo n.º 1
0
        /// <summary>
        /// Gets or sets the item at the specified index.
        /// </summary>
        /// <param name="index">The index of the item to get or set.</param>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        /// <paramref name="index"/> is not a valid index in this list.
        /// </exception>
        /// <exception cref="T:System.NotSupportedException">
        /// This property is set and the list is read-only.
        /// </exception>
        public virtual T this[int index]
        {
            get
            {
                ListHelper.CheckExistingIndexArgument(this.Count, index);
                return(this.DoGetItem(index));
            }

            set
            {
                ListHelper.CheckExistingIndexArgument(this.Count, index);
                this.DoSetItem(index, value);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Removes the item at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index of the item to remove.</param>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 /// <paramref name="index"/> is not a valid index in this list.
 /// </exception>
 /// <exception cref="T:System.NotSupportedException">
 /// This list is read-only.
 /// </exception>
 public virtual void RemoveAt(int index)
 {
     ListHelper.CheckExistingIndexArgument(this.Count, index);
     this.DoRemoveAt(index);
 }