Archived
This forum has been archived. Please start a new discussion on GitHub.
Why class cannot be a key for a dictionary?
Comments
-
Because classes support inheritance, they could potentially contain anything, including other maps, or floating point types, both of which are not suitable as dictionary keys (at least not for all language mappings).0