fARcRY
fARcRY

Reputation: 2358

What is the quickest generic collection?

I have the following scenario. I have two collections, one has some items missing. What collection type would be the quickest to find the missing items and insert them?

Upvotes: 3

Views: 298

Answers (3)

Alfred Myers
Alfred Myers

Reputation: 6453

You may want to take a look into HashSet which has a method called UnionWith.

Upvotes: 2

Armand
Armand

Reputation: 24393

Clone the one without items missing.

Upvotes: 2

Scordo
Scordo

Reputation: 1051

HashSet is your friend: http://msdn.microsoft.com/en-us/library/bb359438.aspx

Upvotes: 5

Related Questions