I need to store a c# dict where I can store members based on a IntPtr and a enum (castable to int if that helps). In other words, if I get the same match of IntPtr and the enum (named sp_playlist_type) I need to be able to get the same result out, but only then (that’s also important). I’ve figured I’d make a struct containing the two, and override GetHashCode(), but then I’d need a hashing-algorithm that doesn’t create duplicates for the two numbers, and generates the same result every time the same two numbers are present.
Share
I think based on the way Tuple’s GetHashCode and Equality is alredy created, you could have:
Provided you are on .NET 4.0 of course.