Memory<T>.Equals 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.
Equals(Memory<T>) |
Determines whether the specified Memory<T> object is equal to the current object. |
Equals(Object) |
Determines whether the specified object is equal to the current object. |
- Source:
- Memory.cs
- Source:
- Memory.cs
- Source:
- Memory.cs
Determines whether the specified Memory<T> object is equal to the current object.
public:
virtual bool Equals(Memory<T> other);
public:
bool Equals(Memory<T> other);
public bool Equals (Memory<T> other);
override this.Equals : Memory<'T> -> bool
Public Function Equals (other As Memory(Of T)) As Boolean
Parameters
- other
- Memory<T>
The object to compare with the current instance.
Returns
true
if the current instance and other
are equal; otherwise, false
.
Implements
Remarks
The two objects are equal if:
other
is a Memory<T> or ReadOnlyMemory<T> object.Both objects point to the same array and have the same length.
The Equals(Memory<T>)
method performs a test for reference equality; it does not compare the elements of Memory<T> for equality.
Applies to
.NET 9 およびその他のバージョン
製品 | バージョン |
---|---|
.NET | Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 |
- Source:
- Memory.cs
- Source:
- Memory.cs
- Source:
- Memory.cs
Determines whether the specified object is equal to the current object.
public:
override bool Equals(System::Object ^ obj);
public override bool Equals (object? obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean
Parameters
- obj
- Object
The object to compare with the current instance.
Returns
true
if the current instance and obj
are equal; otherwise, false
.
Remarks
Two Memory<T> objects are equal if both objects point to the same array and have the same length. Note that the test for equality does not check whether the contents are equal.
Applies to
.NET 9 およびその他のバージョン
製品 | バージョン |
---|---|
.NET | Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。