ComArray.FromEnumerable

Creates a copied array instance from an enumerable.

If enumerables aren't bound to a concrete list/collection and retrieved one at a time, there's no way to return it to FoxPro unless it's materialized into some sort of list.

This method makes a copy of the enumerable and allows you to iterate over it.

You can update existing items in the array, but you cannot add/remove/clear items and affect the underlying enumerable. If the type is truly Enumerated it won't support updating either, so this is not really a restriction imposed here.

If the underlying enumerable is a concrete list or collection type you should be able to use the relevant Add/Remove/Clear methods directly without requiring this method to make a copy.

public void FromEnumerable(IEnumerable items)

Return Value

nothing but sets the COM Array instance

Parameters

items
An instance of the enumerable from which to create the COM Array instance.


See also:

Class ComArray

© West Wind Technologies, 2023 • Updated: 01/13/23
Comment or report problem with topic