Condividi tramite


PSUtility.BuildIndex<TKey> Method

Reserved for internal use.

Namespace:  Microsoft.Office.Project.Server.Library
Assembly:  Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function BuildIndex(Of TKey) ( _
    table As DataTable, _
    keySelector As Func(Of DataRow, TKey) _
) As IDictionary(Of TKey, DataRow)
'Usage
Dim table As DataTable
Dim keySelector As Func(Of DataRow, TKey)
Dim returnValue As IDictionary(Of TKey, DataRow)

returnValue = table.BuildIndex(keySelector)
public static IDictionary<TKey, DataRow> BuildIndex<TKey>(
    this DataTable table,
    Func<DataRow, TKey> keySelector
)

Type Parameters

  • TKey

Parameters

Return Value

Type: System.Collections.Generic.IDictionary<TKey, DataRow>
Returns IDictionary<TKey, TValue>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=office.14) or https://msdn.microsoft.com/en-us/library/bb383977(v=office.14).

See Also

Reference

PSUtility Class

PSUtility Members

Microsoft.Office.Project.Server.Library Namespace