Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPAddressCollection::IEnumerable::GetEnumerator Method ()

 

Returns an object that can be used to iterate through this collection.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

private:
virtual IEnumerator^ GetEnumerator() sealed = IEnumerable::GetEnumerator

Return Value

Type: System.Collections::IEnumerator^

An object that implements the IEnumerator interface and provides access to the IPAddressCollection types in this collection.

The object that is returned by this method is initially positioned before the first element in this collection. You must call the MoveNext method before you can access the first element. To access the element at the current position, call the Current property.

Do not modify the collection while using the enumerator. If the collection is modified while an enumerator is in use, an attempt to set the position by calling MoveNext or Reset causes an InvalidOperationException.

For a detailed description of enumerators, see the documentation for the IEnumerator class and the GetEnumerator method.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft