KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I step through the following code the call to ReturnOne() is skipped. static IEnumerable<int> OneThroughFive() { ReturnOne(); yield return 2; yield return 3; yield return 4; yield return 5; } static IEnumerator<int> ReturnOne() { yield return 1; } I can only assume the compiler is stripping it out because what I'm doing is not valid. I'd like the ability to isolate my enumeration into various methods. Is this possible?
Tags (comma-separated)
Save Edits
Cancel