Assert.Equals(Object, Object) Method

Definition

Static equals overloads are used for comparing instances of two types for reference equality. This method should not be used for comparison of two instances for equality. This object will always throw with Assert.Fail. Please use Assert.AreEqual and associated overloads in your unit tests.

C#
public static bool Equals(object objA, object objB);
C#
public static bool Equals(object? objA, object? objB);

Parameters

objA
Object

Object A.

objB
Object

Object B.

Returns

False, always.

Applies to

Produit Versions
MSTest.TestFramework 1.1.18, 1.2.1, 1.3.2, 1.4.0, 2.2.0, 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0