ILNumerics Ultimate VS

ConcreteRetArrayT1, LocalT, InT, OutT, RetT, StorageTGetEnumerator Method

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Gives an enumerator returning elements of this array as T1.

[ILNumerics Core Module]

Namespace:  ILNumerics.Core.Arrays
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public IEnumerator<T1> GetEnumerator()

Return Value

Type: IEnumeratorT1
Remarks

This function enables ILNumerics arrays to be used in 'foreach' constructs (C#).

The iteration is performed in the natural order of storage (column major storage) over all elements of this array.

Return-type arrays are automatically released after the iteration of the elements was completed or canceled. In order for this to work properly one has to use foreach() on the array directly or make sure to dispose the enumerator returned here after finishing iterating the values. What foreach does automatically - in the case of manually using IEnumerator{T}.MoveNext() the Release call will only be performed after all values have been iterated! So one must dispose the enumerator explicitly when the iteration is cancelled prematurely by calling enumerator.Dispose(). Again, this is not necessary when foreach() is used.

[ILNumerics Core Module]

See Also

Reference