Why does Dictionary in C# Have a .Distinct() Extension? -


as title says, why dictionary collection in c# contain .distinct() extension if it's possible dictionary contain non-distinct keys? there legitimate reasoning behind or reading far it?

dictionary<tkey, tvalue> implements ienumerable<keyvaluepair<tkey, tvalue>> has distinct extension. dictionary class doesn't have implementation of distinct

calling distinct translated call static extension method:

enueramble.distinct(ienumerable<t> source) 

which unneccesary dictionary since keys distinct (and hence key/value pairs distinct) technically there's nothing wrong it.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -