C#: Lookup vs. Dictionary
The main difference between the Generic Classes Lookup and Dictionary is the uniqueness of the Key. While Dictionarys can only have a Key-Value once,
in Lookup it can occur multiple times.
Declaration is the same.
Lookup<int,string> myLookup = new Lookup<int,string>();
vs.
Dictionary<int,string> myDic = new Dictionary<int,string>();
Furter Reading:
* A nice article about using ToDictionary and ToLookup in Linq can be found @blog.donnfelker.com



17. Februar 2010 at 16:22
Does anybody know the .net framework completely? Well, I have to admit I don’t. It’s the first time I read about Lookup(of T). So thank you for the hint.
01. März 2010 at 19:30
Hi,
greetings from offenbach. Never heard of loopups… maybe you should correct it to lookups
… but as rainer said…. never heard of lookups too. great info.
Ciao Marco
09. März 2010 at 16:00
Thanks Marco, how did this happen ? damn ;o)
I never heard of them, too – always used Collection of KeyValue Pairs for this kind of stuff.
Greetings from Berlin to Offenbach
Sascha