Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add params overloads #166

Open
JamesFaix opened this issue Apr 24, 2016 · 4 comments
Open

Add params overloads #166

JamesFaix opened this issue Apr 24, 2016 · 4 comments

Comments

@JamesFaix
Copy link

For some operators, it would be very convenient to have overloads that take params arrays as arguments.

  • Union(this IEnumerable<T> source, T item, params T[] items)
  • Except(this IEnumerable<T> source, T item, params T[] items)
  • Concat(this IEnumerable<T> source, T item, params T[] items)
  • Intersect(this IEnumerable<T> source, T item, params T[] items)

Intersect seems less useful than the others, but it might as well be included for completeness if the other three are.

@atifaziz
Copy link
Member

This should be put on hold as dotnet/roslyn#36 will help to avoid adding all those overloads (and more) if the feature makes it into C# 7 or vNext. Meanwhile, it's merely about convenience for very short and hard-coded sequences.

@JamesFaix
Copy link
Author

That's understandable.

@atifaziz atifaziz added the hold label Apr 30, 2016
@JamesFaix
Copy link
Author

Thanks Sergey. Of all the suggestions I saw on there though, I think params enhancements is a pretty trivial matter. (But, perhaps that will make it more likely to be implemented.) All my votes are currently on suggestions dealing with static interfaces/generics, integrated code contracts, and non-nullable types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants