Share via


CollectionBase<T>.IEnumerable.GetEnumerator Method

Gets an enumerator that can iterate through the CollectionBase.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Private Function GetEnumerator As IEnumerator
    Implements IEnumerable.GetEnumerator
'Usage
Dim instance As CollectionBase
Dim returnValue As IEnumerator

returnValue = CType(instance, IEnumerable).GetEnumerator()
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
IEnumeratorIEnumerable.GetEnumerator()

Return Value

Type: System.Collections.IEnumerator
A T:System.Collections.IEnumerator interface for iterating the CollectionBase.

Implements

IEnumerable.GetEnumerator()

Remarks

#GetEnumerator is the method that implements the foreach statement (For Each in Visual Basic). You should not need to call this method directly.

See Also

Reference

CollectionBase<T> Class

CollectionBase<T> Members

Microsoft.SharePoint.Publishing Namespace