Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mtaku3
Copy link
Collaborator

@mtaku3 mtaku3 commented Jan 26, 2023

Removing a element of enumerable in foreach is not allowed to do. It throws exception if you do that.
PR includes fixes, but I'm not sure this code is covering all. At least, it worked on my environment without any exceptions.

Copy link
Owner

@iluvadev iluvadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
You are right, a collection used in a foreach must be immutable. A foreach can not be used to add or remove elements.

Sorry for that!

@iluvadev iluvadev merged commit acbf6fe into iluvadev:main Jan 28, 2023
@mtaku3
Copy link
Collaborator Author

mtaku3 commented Jan 28, 2023

I appreciate your approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants