![]() |
|
|
An example of looping through a .NET collection via the System.Collections.IEnumerable interface
Many of the collection classes don't support the ToArray() method, which means accessing the data from LabVIEW requires the IEnumerator. In C# or VB.NET examples, you most often see the "foreach" statement being used - which is a shorthand way of telling the compiler to use IEnumerator.So this example shows in complete detail how to take an IEnumerator interface and convert the list of elements into a LabVIEW Array.Note, a full conversion to a LabVIEW array can be very expensive for large collections, so think carefully about what it is you need from the collection before doing this. But regardless of your approach, the example should show the basics of using the interface. Other requirements:
Windows, .NET Framework 1.1 SP1 or later.
There are no comments on this document