Castle.Facilities.NHibernateIntegration.Util.FieldInfoCollection.RemoveRange C# (CSharp) Метод

RemoveRange() публичный Метод

Removes the specified range of elements from the FieldInfoCollection.
Please refer to ArrayList.RemoveRange for details.
/// and /// do not denote a valid range of elements in the /// . /// is less than zero. /// -or- /// is less than zero. /// /// The /// is read-only or has a fixed size.
public RemoveRange ( int index, int count ) : void
index int /// The zero-based starting index of the range of elements to remove. ///
count int The number of elements to remove.
Результат void
		public virtual void RemoveRange(int index, int count)
		{
			if (index < 0)
				throw new ArgumentOutOfRangeException("index", index, "Argument cannot be negative.");

			if (count < 0)
				throw new ArgumentOutOfRangeException("count", count, "Argument cannot be negative.");

			if (index + count > _data.Count)
				throw new ArgumentException("Arguments denote invalid range of elements.");

			if (count == 0) return;
			_data.Count -= count;

			if (index < _data.Count)
				Array.Copy(_data.Items, index + count, _data.Items, index, _data.Count - index);

			Array.Clear(_data.Items, _data.Count, count);
		}