no dogma blog
no dogma blog
Blog Posts
Podcast
Web API Lambda Course
Polly Course
Photos
Contact
Support this Site
About
RSS
Light
Dark
Automatic
Dictionary
Why you should use IDictionary, IList, etc
Summary When returning objects from a method try to use IList, IDictionary, etc instead of List and Dictionary. This is especially important when the method is inside a class library which you distribute.
Feb 17, 2016
#
Casting
,
Dictionary
,
Interfaces
Filtering a Dictionary by value with a List as the value
Filtering out entries in a dictionary is not too difficult when the key and value are simple. For example if you had - IDictionary oneToFourDictionary = new Dictionary {{ "one", 1 }, { "two", 2 }, { "three", 3 }, { "four", 4 } };
Feb 11, 2016
#
Dictionary
,
Filter
Cite
×