Fastest way to find common items across multiple lists in C#

后端 未结 11 1829

Given the following:

List> optionLists;

what would be a quick way to determine the subset of Option objects that a

11条回答
  •  无人及你
    2021-01-19 03:03

    I don't have the performance stats, but if you don't want to roll your own method, various collections libraries have a 'Set' or 'Set(T)' object that offer the usual set procedures. (listed in the order I would use them).

    1. IESI Collections (literally just Set classes)
    2. PowerCollections (not updated in a while)
    3. C5 (never personally used)

提交回复
热议问题