public void CopyTo(T[] array, int arrayIndex) { if (array == null) { throw new ArgumentNullException(nameof(array)); } if (arrayIndex < 0) { throw new ArgumentOutOfRangeException(nameof(arrayIndex)); } if (array.Length <= arrayIndex && Count > 0) { throw new ArgumentException(ErrorStrings.Argument_IndexOutOfArrayBounds); } if (array.Length - arrayIndex < Count) { throw new ArgumentException(ErrorStrings.Argument_InsufficientSpaceToCopyCollection); } int count = Count; for (int i = 0; i < count; i++) { array[i + arrayIndex] = FromAbiHelper.GetAt(_vector, (uint)i); } }
public bool Remove(T item) { uint index; bool exists = _vector.IndexOf(item, out index); if (!exists) { return(false); } if (((uint)int.MaxValue) < index) { throw new InvalidOperationException(ErrorStrings.InvalidOperation_CollectionBackingListTooLarge); } FromAbiHelper.RemoveAtHelper(_vector, index); return(true); }