Friday, December 31, 2004 3:19 PM
pgolde
Added Algorithms.GetIdentityComparer
Thanks to a comment by J. Marsch, I added a new method to Algorithms today: GetIdentityComparer(). This method returns an IComparer that compares objects for equality by always using object identity. In other words, this comparer will say that two objects are equal only if they are actually the same object. This can be useful for an efficiency gain (i.e., you always Intern strings), or when you want to use a Dictionary to associate information with unique object instance regardless of their Equals implementation.