Returns the current item in the enumeration, your "place" in the enumeration.
When the iterator is first supplied or when it is CommonInterfaces.IObjectIterator.Reset, there is no current element (calling this method in such a case should raise an exception). Only after the first call to the NextElement method will this method return a value.
Unlike the CommonInterfaces.IObjectIterator.NextElement method which returns a new value every time you call it, this method always returns the same value no matter how many times you call it (until NextElement is called, of course).
Namespace: CommonInterfaces
Delphi |
public |
Return Value
Type: TObject
The following code gives a sample implementation from the TStringsIterator object, List is the TStrings that is supplying the underlying elements and Index is a hidden index for the enumeration: Delphi |
begin |