PSUtility.ToSet<TKey, TBase> Method (IEnumerable<TBase>, Func<TBase, TKey>)

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 ToSet(Of TKey, TBase) ( _
    enumerable As IEnumerable(Of TBase), _
    keySelector As Func(Of TBase, TKey) _
) As HashSet(Of TKey)
'Usage
Dim enumerable As IEnumerable(Of TBase)
Dim keySelector As Func(Of TBase, TKey)
Dim returnValue As HashSet(Of TKey)

returnValue = enumerable.ToSet(keySelector)
public static HashSet<TKey> ToSet<TKey, TBase>(
    this IEnumerable<TBase> enumerable,
    Func<TBase, TKey> keySelector
)

Type Parameters

  • TKey
  • TBase

Parameters

Return Value

Type: System.Collections.Generic.HashSet<TKey>
Returns HashSet<T>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<TBase>. 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

ToSet Overload

Microsoft.Office.Project.Server.Library Namespace