Skip to content

Potential BUG: removing elements from a generic list while iterating over it? #106

@shashibici

Description

@shashibici

_brothelList[i].CaptiveProstitutes.RemoveAt(y);

I think this is a bug: it removes elements from a generic list while iterating over it.

It's been discussed here: https://stackoverflow.com/questions/1582285/how-to-remove-elements-from-a-generic-list-while-iterating-over-it

There are some other places that also use this way to modify a List.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions