KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I use the yield return keyword quite a bit, but I find it lacking when I want to add a range to the IEnumerable . Here's a quick example of what I would like to do: IEnumerable<string> SomeRecursiveMethod() { // some code // ... yield return SomeRecursiveMethod(); } Naturally this results in an error, which can be resolved by doing a simple loop. Is there a better way to do this? A loop feels a bit clunky.
Tags (comma-separated)
Save Edits
Cancel