-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Proposal] Extension GetEnumerator (VS 16.8, .NET 5) #3194
Comments
I see 2 pitfalls here:
I would suggest that something like |
An extension
It's possible that you could import two namespaces that each have their own extension A number of existing language features, like |
Should the collection type be the type of the extension method parameter? |
why simple dont use a foreach(var item in source.GetEnumerable()) |
Because foreach (var i in 1..10) is more appealing than: foreach (var i in 1..10.ToEnumerable()) |
The actual spec text is now checked in, so I'll remove it from this issue. |
This was shipped in C# 9. It still needs to be incorporated into the ECMA specification, which is what the |
Extension GetEnumerator Recognition in
foreach
Discussion in #600
The text was updated successfully, but these errors were encountered: