Unsafe.AreSame<T>(T, T) Method
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.
Determines whether the specified managed pointers point to the same location.
public:
generic <typename T>
static bool AreSame(T % left, T % right);
C#
public static bool AreSame<T>(ref T left, ref T right);
static member AreSame : 'T * 'T -> bool
Public Shared Function AreSame(Of T) (ByRef left As T, ByRef right As T) As Boolean
- T
The elemental type of the managed pointers.
- left
- T
The first managed pointer to compare.
- right
- T
The second managed pointer to compare.
true
if left
and right
point to the same location; otherwise, false
.
Product | Versions |
---|---|
.NET | Core 1.1, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Standard | 2.0 (package-provided) |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: