The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Assert::AreSame Method
Verifies that specified object variables refer to the same object.
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | AreSame(Object^, Object^) | Verifies that two specified object variables refer to the same object. The assertion fails if they refer to different objects. |
![]() ![]() | AreSame(Object^, Object^, String^) | Verifies that two specified object variables refer to the same object. The assertion fails if they refer to different objects. Displays a message if the assertion fails. |
![]() ![]() | AreSame(Object^, Object^, String^, array<Object^>^) | Verifies that two specified object variables refer to the same object. The assertion fails if they refer to different objects. Displays a message if the assertion fails, and applies the specified formatting to it. |
Show:

