You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The two extension methods allow for method chaining, which may make code more readable - opposed to having to call the HashSet<T> constructor manually.
/// Creates a <see cref="HashSet{TResult}"/> from an <see cref="IEnumerable{T}"/> according to specified selector function.
130
+
/// </summary>
131
+
/// <typeparam name="TSource">The type of the elements of <paramref name="source"/>.</typeparam>
132
+
/// <typeparam name="TResult">The type of the value returned by <paramref name="selector"/>.</typeparam>
133
+
/// <param name="source">An <see cref="IEnumerable{T}"/> to create a <see cref="HashSet{TResult}"/> from.</param>
134
+
/// <param name="selector">A function to extract a key from each element.</param>
135
+
/// <param name="comparer">The <see cref="IEqualityComparer{T}"/> implementation to use when comparing values in the set, or null to use the default <see cref="EqualityComparer{T}"/> implementation for the set type.</param>
136
+
/// <returns>A <see cref="HashSet{TResult}"/> that contains values of type <typeparamref name="TResult"/> selected from the input sequence.</returns>
0 commit comments