PowerTCP Zip Compression for .NET
GetEnumerator Method




Returns an enumerator for the collection.
Syntax
Public Function GetEnumerator() As IEnumerator
Dim instance As Archive
Dim value As IEnumerator
 
value = instance.GetEnumerator()
public IEnumerator GetEnumerator()
public: IEnumerator* GetEnumerator(); 
public:
IEnumerator^ GetEnumerator(); 

Return Value

An IEnumerator for the entire collection.
Remarks

Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection.

Initially, the enumerator is positioned before the first element in the collection. IEnumerator.Resetalso brings the enumerator back to this position. At this position, calling IEnumerator.Current throws an exception. Therefore, you must call IEnumerator.MoveNext to advance the enumerator to the first element of the collection before reading the value of IEnumerator.Current.

IEnumerator.Current returns the same object until either IEnumerator.MoveNext or IEnumerator.Reset is called. IEnumerator.MoveNext sets IEnumerator.Current to the next element.

After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling IEnumerator.MoveNext returns false. If the last call to IEnumerator.MoveNext returned false, calling IEnumerator.Current throws an exception. To set IEnumerator.Current to the first element of the collection again, you can call IEnumerator.Reset followed by IEnumerator.MoveNext.

This method is used by the "foreach" construct.

See Also

Reference

Archive Class
Archive Members


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic