Shortcut for "foreach... yield return" pattern #4169
Answered
by
CyrusNajmabadi
ekolis
asked this question in
Language Ideas
-
If you have a method which returns
Or using
However this becomes awkward when you want to combine the two:
I know this is a bit of a contrived example but I'm sure you can see practical scenarios where this would happen! So there really ought to be some sort of shortcut for this "foreach... yield return" pattern. Maybe something like this:
|
Beta Was this translation helpful? Give feedback.
Answered by
CyrusNajmabadi
Nov 23, 2020
Replies: 1 comment
-
Dup of #378 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YairHalberstadt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dup of #378