I created a test program to implement an iterator.
First, I used 'yield break' in the iterator, it worked normally.
Then, I simply used 'break' in the places of 'yield break', it still worked
normally.
What's the difference between 'yield break' and 'break' here?
Thanks!
First, I used 'yield break' in the iterator, it worked normally.
Then, I simply used 'break' in the places of 'yield break', it still worked
normally.
What's the difference between 'yield break' and 'break' here?
Thanks!
Comment