/// <summary> /// Copy a component value to another component array /// </summary> /// <param name="source">The source index from our array</param> /// <param name="other">The other array where values will be copied to</param> /// <param name="destination">The destination index of the other array</param> public void CopyTo(int source, ComponentArray other, int destination) { if (other.Type != Type) { throw new InvalidOperationException("not the same type"); } wrapped.CopyTo(source, other.wrapped, destination); }
void ICollection <KeyValuePair <TKey, TValue> > .CopyTo(KeyValuePair <TKey, TValue>[] array, int arrayIndex) { Wrapped.CopyTo(array, arrayIndex); }
/// <summary> /// Copies the elements of the <see cref="ICollection{T}"/> to an /// <see cref="Array"/>, starting at a particular <see cref="Array"/> /// index. /// </summary> /// /// <param name="array"> /// The one-dimensional <see cref="Array"/> that is the /// destination of the elements copied from <see cref="ICollection{T}"/>. /// The <see cref="Array"/> must have zero-based indexing. /// </param> /// <param name="arrayIndex"> /// The zero-based index in array at which copying begins. /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// arrayIndex is less than 0. /// </exception> /// <exception cref="ArgumentNullException"> /// array is null. /// </exception> /// <exception cref="ArgumentException"> /// array is multidimensional.<br/>-or-<br/> /// arrayIndex is equal to or greater than the length of array. <br/>-or-<br/> /// The number of elements in the source <see cref="ICollection{T}"/> /// is greater than the available space from arrayIndex to the end of /// the destination array. <br/>-or-<br/> /// Type T cannot be cast automatically to the type of the destination array. /// </exception> public override void CopyTo(KeyValuePair <TKey, TValue>[] array, int arrayIndex) { Wrapped.CopyTo(array, arrayIndex); }