Returns the next item in the enumeration. If there are no more items, the method will raise an exception. To check if there are more items, use the RSInterfaceCollections.TInterfaceListIterator.HasMoreElements method. The NextElement method advances its place in the enumeration and then returns that item. Every call to NextElement returns a new item (until the end of the enumeration). If you wish to access the current item multiple times in a loop, use the RSInterfaceCollections.TInterfaceListIterator.CurrentElement method.
This method is part of the CommonInterfaces.IInterfaceIterator interface.
Namespace: RSInterfaceCollections
Delphi |
public |
Return Value
Type: IInterface
IInterfaceIterator.NextElement
The following code shows how to use the iterator to get all the values in a list object, note that this code assumes that every interface in the list is an IFact interface:
|