using System.Collections.Generic;
Dictionary<ushort, List<uint>> scenarioModulesDictionary = new Dictionary<ushort, List<uint>>();
scenarioModulesDictionary.Add(10, new List<uint> {1,2,3});
scenarioModulesDictionary.Add(50, new List<uint> {4,5,6});
scenarioModulesDictionary.Add(100, new List<uint> {4,8,9});
uint currentScenarioKey = 50;
foreach (var entry in scenarioModulesDictionary)
if (entry.Key != (ushort)currentScenarioKey )
IEnumerable<uint> similarQuery =
scenarioModulesDictionary[(ushort)currentScenarioKey].Intersect(entry.Value);
foreach (uint s in similarQuery)
Console.WriteLine("Found module " + s + " in scenario " + entry.Key);
ushort currentScenarioKey;
List<uint> myList = new List<uint>();
public WhModule(ushort currentScenarioKey, List<uint>myList)
this.currentScenarioKey = currentScenarioKey;