GatewayIPAddressInformationCollection.IEnumerable.GetEnumerator Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

C#
System.Collections.IEnumerator IEnumerable.GetEnumerator();

Returns

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

Implements

Remarks

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.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1