Simple bug -- System.Web.UI.WebControls.DataKey in System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a doesn't have Equals() implemented properly.There's a Equals(DataKey) method, which does a correct equality check, but the Equals(object) isn't overridden, which results in a pure reference check depending on which Equals call is called at compile-time. So if you have two DataKey objects, k1 and k2, where k2 is a clone of k1, k1.Equals(k2) will return true. However, if you put k1 into an untyped collection (for example, like an ArrayList), arrayList.Contains(k2) will return false because ArrayList is calling Equals(object)
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...