You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicIEnumerator<RadioStation> GetEnumerator(){//Usecanswitchtothisinternalcollectionifyoudo not wanttotransform//returnmStations.GetEnumerator();//usethisifyouwanttotransformtheobjectbeforerenderingforeach(varxinmStations){yieldreturnx;}}IEnumeratorIEnumerable.GetEnumerator(){returnthis.GetEnumerator();}
Currently is wrong and throws StackOverflowException.
publicIEnumerator<RadioStation> GetEnumerator(){returnthis.GetEnumerator();}IEnumeratorIEnumerable.GetEnumerator(){//Usecanswitchtothisinternalcollectionifyoudo not wanttotransform//returnmStations.GetEnumerator();//usethisifyouwanttotransformtheobjectbeforerenderingforeach(varxinStations){yieldreturnx;}}
The text was updated successfully, but these errors were encountered:
For iterator pattern should be:
Currently is wrong and throws StackOverflowException.
The text was updated successfully, but these errors were encountered: