SPElementDefinitionCollection.System.Collections.IEnumerable.GetEnumerator Method

Gets an enumerator with which to iterate through the collection.

Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)

Syntax

Return Value

Returns IEnumerator that can be used to iterate through the collection.

Remarks

The foreach statement of the C# language (For Each in Visual Basic) hides the complexity of the enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator.

See Also

Reference

SPElementDefinitionCollection Class
SPElementDefinitionCollection Members
Microsoft.SharePoint.Administration Namespace
GetEnumerator
SPElementDefinition Class