Castle.Facilities.NHibernateIntegration.Util.FieldInfoCollection.Insert C# (CSharp) Method

Insert() public method

Inserts a FieldInfo element into the FieldInfoCollection at the specified index.
Please refer to ArrayList.Insert for details.
/// is less than zero. /// -or- /// is greater than . /// /// The /// is read-only or has a fixed size. /// -or- /// The FieldInfoCollection /// already contains , /// and the FieldInfoCollection /// ensures that all elements are unique. ///
public Insert ( int index, FieldInfo value ) : void
index int /// The zero-based index at which /// should be inserted.
value FieldInfo /// The object to insert /// into the . /// This argument may be a null reference. ///
return void
		public virtual void Insert(int index, FieldInfo value)
		{
			int count = _data.Count;

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

			if (index > count)
				throw new ArgumentOutOfRangeException("index", index, "Argument cannot exceed Count.");

			if (_data.IsUnique) CheckUnique(value);

			if (count == _data.Items.Length)
				_data.EnsureCapacity(count + 1);

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

			_data.Items[index] = value;
			_data.Count++;
		}