Saturday, December 27, 2014

Does ObservableCollection.RemoveAt() do two selections?

I have one doubt. You recomend me to use selectedItem instead of SelectedIndex, but when I do:


myObservableCollection.Remove(myItem);


Does this action a complex of O(n)? Because I have to iterate the collection until I get the ítem. However, if I use RemoveAt(), the complex is O(1).


Is that true?


Thank so much.


No comments:

Post a Comment