2

I need a Collection that contains no duplicates and the items are in order. I know hashSet contains a set with no duplicates. But items in a set are in no specific order.

What alternative do I have? Are there any built-in list in .Net that can be used in c# programming language?

EDIT: The set must also be an observable

I need to use this set to work with WPF in MVVM principles. any observablecollection sortedset?

8

1 Answer 1

5

Sorted set might be the collection you're looking for.

SortedSet is an ordered set collection. We have many elements and want to store them in a sorted order and also eliminate all duplicates from the data structure. The SortedSet is part of the System.Collections.Generic namespace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.