CollectionAssert.ReferenceEquals(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
CollectionAssert.ReferenceEquals should not be used for Assertions. Please use CollectionAssert methods or Assert.AreSame & overloads instead.
Static ReferenceEquals overloads are used for comparing instances of two types for reference equality. This method should not be used for comparison of two instances for reference equality. Please use CollectionAssert methods or Assert.AreSame and associated overloads in your unit tests.
[System.Obsolete("CollectionAssert.ReferenceEquals should not be used for Assertions. Please use CollectionAssert methods or Assert.AreSame & overloads instead.", true)]
public static bool ReferenceEquals(object? objA, object? objB);
[<System.Obsolete("CollectionAssert.ReferenceEquals should not be used for Assertions. Please use CollectionAssert methods or Assert.AreSame & overloads instead.", true)>]
static member ReferenceEquals : obj * obj -> bool
Public Shared Function ReferenceEquals (objA As Object, objB As Object) As Boolean
Parameters
- objA
- Object
Object A.
- objB
- Object
Object B.
Returns
Never returns.
- Attributes