Skip to content

CompositeDisposable.CopyTo(IDisposable[], int) method

Defined in

Type: CompositeDisposable Namespace: System.Reactive.Disposables Assembly: System.Reactive.dll

Applies to

net8.0, net8.0-windows10.0.19041, netstandard2.0

public void CopyTo(IDisposable[] array, int arrayIndex)

Inherited documentation

These docs were inherited from ICollection<IDisposable>. The member doesn't override them on this type.

Summary: Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters

NameTypeDescription
arrayIDisposable[]The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.

Exceptions

TypeCondition
System.ArgumentNullExceptionarray is null.
System.ArgumentOutOfRangeExceptionarrayIndex is less than 0.
System.ArgumentExceptionThe number of elements in the source ICollection is greater than the available space from arrayIndex to the end of the destination array.