linq - wpf overriding getHashCode and Eqaul in ContentControl -


hi have class derives contentcontrol , i'm not able override gethashcode , equal method. error

error 5 cannot override inherited member 'system.windows.dependencyobject.gethashcode()' because sealed there way override method ? need use union method linq need compare object different condition normal. there way ?

yes - implement iequalitycomparer<t> separately, , pass relevant overload of union.

basically you'll telling how compare 2 items equality, , how take hash code of 1 item. union use custom comparison when building hash sets etc. don't need override existing methods.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -