On Wed, 30 Oct 2013 16:34:33 +0000
Nigel Small
It strikes me that there could be an alternative approach to some of the use cases discussed here. Instead of a new type of dictionary, the case-insensitivity problem could be solved with something akin to a * CaseInsensitiveString* class used for keys within a standard dictionary. This would be very similar to a normal string except with comparison and hashing. It would mean that CaseInsensitiveString("Foo") is considered equal to CaseInsensitiveString("foo") and allow code such as the following:
And how does a case-insensitive string compare with a normal (case-sensitive) string? This is a can of worms. (if you answer, please don't answer in this thread but open a separate one for case-insensitive strings, thanks) Regards Antoine.