ObjectMaterializer<TDataReader>.CreateGroup<TKey, TElement> Method (TKey, IEnumerable<TElement>)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Creates a group from a specified key and collection of values.

Namespace:   System.Data.Linq.SqlClient.Implementation
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public static IGrouping<TKey, TElement> CreateGroup<TKey, TElement>(
	TKey key,
	IEnumerable<TElement> items
)

Parameters

key
Type: TKey

The key for the group.

items
Type: System.Collections.Generic.IEnumerable<TElement>

The values for the group.

Return Value

Type: System.Linq.IGrouping<TKey, TElement>

A group that has the specified key and the specified collection of values.

Type Parameters

TKey

The type of the key of the group.

TElement

The type of the values in the group.

.NET Framework
Available since 3.5
Return to top
Show: