Class ToArray
Represents an operator that creates an array containing every element in the observable sequence.
ToArray
emits a single array of the same type as the type of the elements in the source sequence. The array is emitted when the source sequence completes successfully.
Warning
If the source sequence is infinite (i.e. does not terminate), this operator will never emit the collection, and will keep accumulating all elements from the source sequence indefinitely, with likely impacts on available memory.
Examples
Use ToArray
to create an array with every element in the sequence.
Note
This example requires the Bonsai.Design.Visualizers
package to be installed.
Collect Input Data
Use ToArray
to collect a sequence of individual elements produced by file reading operators such as CsvReader
.
Note
This example requires the Bonsai.IO
package to be installed.
Alternative
Use ToList
if you need to manipulate elements in the collection.
[Combinator]
public class ToArray
- Inheritance
-
ToArray
- Inherited Members
Methods
- Process<TSource>(IObservable<TSource>)
Creates an array containing every element in the observable sequence.