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