user1076406
user1076406

Reputation:

Merging the intersection of multiple ObservableCollections

I have multiple ObservableCollections and I want to make an ObservableCollection out of the intersection of all of them. Also, what would be the best way to organize this in MVVM if all the listboxes I'm using to view the individual and merged collections are in 1. the same view and 2. different views.

I'm working in WPF C#.

Thank you! Any link or comment appreciated. :)

Upvotes: 0

Views: 1306

Answers (1)

Rohit Vats
Rohit Vats

Reputation: 81253

You need to call the intersection of two Collections and manually add each object in your collection. This will get you started, simply replace the 'Union' keyword with 'Intersection' in the answer - Intersection of two collections

Upvotes: 2

Related Questions