Share via


DataServiceQuery<TElement>.GetEnumerator Method

Executes the query and returns the results as a collection.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Function GetEnumerator As IEnumerator(Of TElement)
'Usage
Dim instance As DataServiceQuery 
Dim returnValue As IEnumerator(Of TElement)

returnValue = instance.GetEnumerator()
public IEnumerator<TElement> GetEnumerator()
public:
virtual IEnumerator<TElement>^ GetEnumerator() sealed
abstract GetEnumerator : unit -> IEnumerator<'TElement> 
override GetEnumerator : unit -> IEnumerator<'TElement> 
public final function GetEnumerator() : IEnumerator<TElement>

Return Value

Type: System.Collections.Generic.IEnumerator<TElement>
A typed enumerator over the results in which TEntity represents the type of the query results.

Implements

IEnumerable<T>.GetEnumerator()

Remarks

When the GetEnumerator method is called, the DataServiceQuery<TElement> is executed against the service.

See Also

Reference

DataServiceQuery<TElement> Class

System.Data.Services.Client Namespace