In one of my projects I'm trying to remove an item from a list where the id is equal to the given id.
I have a BindingList<T>
called UserList
.
Lists have all the method RemoveAll()
.
Since I have a BindingList<T>
, I use it like that:
UserList.ToList().RemoveAll(x => x.id == ID )
However, my list contains the same number of items as before.
Why it's not working?