Are ObservableCollections in WPF implemented as linked lists or as arrays?
Basically, is random access into an ObservableCollection constant time?
(Yes, I've googled; can find no discussion of this anywhere. I need to maintain an ObservableCollection in sorted order and am trying to figure out if it is worth it to do a binary search)
WPF ObservableCollection implementation details
Nevermind ... found the answer here.
It's backed by a dynamic array. So O(1) random access lookups and amoritized O(1) inserts at the end. Regular inserts are O(n).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement