CollectionBase<T>.GetEnumerator Method
Returns a generic enumerator that can iterate through this generic CollectionBase instance.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Function GetEnumerator As IEnumerator(Of T)
'Usage
Dim instance As CollectionBase
Dim returnValue As IEnumerator(Of T)
returnValue = instance.GetEnumerator()
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public IEnumerator<T> GetEnumerator()
Return Value
Type: System.Collections.Generic.IEnumerator<T>
A System.Collections.IEnumerator for iterating this CollectionBase instance.
Implements
IEnumerable<T>.GetEnumerator()
Remarks
GetEnumerator is the method that implements the foreach statement (For Each in Visual Basic). You do not need to call this method directly. This method implements the Microsoft .NET FrameworkIEnumerable_T.GetEnumerator method. See the Microsoft .NET Framework SDK for details about the IEnumerable_T.GetEnumerator method.