Equals
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Checks for equality of an object to the current object.
retval = object.Equals(objectToCompare)
Arguments
objectToCompare |
object The object to compare to the calling object. |
Managed Equivalent
Each managed type (particularly structures) often implements its own definition of Equals, but the base definition is on Object.
Remarks
Equality is determined by reference equality. In Silverlight JavaScript programming, this applies even if you compare two instances, such as Point objects, that have identical string initialization for their internal values. In other words, if you create two Point instances with X,Y values of (0,0), they will not evaluate as being equal for this implementation of the Equals method.
Some of the object types listed in the Applies To section are abstract types. The Equals method cannot truly be called on those types in JavaScript because there is no way to obtain instances of abstract types in JavaScript programming.
Applies To
Accessibility Object (Silverlight JSAPI)
BitmapImage (Silverlight 2)
Border (Silverlight 2)
Brush (abstract)
ColorKeyFrame (abstract)
DeepZoomImageTileSource (Silverlight 2)
DependencyObject (abstract)
DiscreteObjectKeyFrame (Silverlight 2)
DoubleKeyFrame (abstract)
Geometry (abstract)
MultiScaleImage (Silverlight 2)
ObjectAnimationUsingKeyFrames (Silverlight 2)
ObjectKeyFrameCollection (Silverlight 2)
PasswordBox (Silverlight 2)
PathSegment (abstract)
PointKeyFrame (abstract)
Popup (Silverlight 2)
StackPanel (Silverlight 2)
TextBox (Silverlight 2)
Timeline (abstract)