File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,18 @@ namespace CodeJam.Collections
12
12
[ PublicAPI ]
13
13
public static partial class EnumerableExtensions
14
14
{
15
+ /// <summary>
16
+ /// Produces the set union of two sequences by using the default equality comparer.
17
+ /// </summary>
18
+ /// <param name="source">An <see cref="IEnumerable{T}"/> whose distinct elements form the first set for the union.</param>
19
+ /// <param name="elements">An <see cref="IEnumerable{T}"/> whose distinct elements form the second set for the union.</param>
20
+ /// <returns>
21
+ /// An <see cref="IEnumerable{T}"/> that contains the elements from both input sequences, excluding duplicates.
22
+ /// </returns>
23
+ [ Pure , NotNull ]
24
+ public static IEnumerable < T > Union < T > ( [ NotNull ] this IEnumerable < T > source , params T [ ] elements ) =>
25
+ source . Union ( elements . AsEnumerable ( ) ) ;
26
+
15
27
/// <summary>
16
28
/// Appends specified <paramref name="element"/> to end of the collection.
17
29
/// </summary>
You can’t perform that action at this time.
0 commit comments