ReadOnlyMemory<T>.Equals ReadOnlyMemory<T>.Equals ReadOnlyMemory<T>.Equals ReadOnlyMemory<T>.Equals Method

定义

重载

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前只读内存区域。Determines whether the specified object is equal to the current read-only memory region.

Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>)

确定当前实例与指定的 ReadOnlyMemory<T> 对象是否相等。Determines whether the current instance and a specified ReadOnlyMemory<T> objects are equal.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前只读内存区域。Determines whether the specified object is equal to the current read-only memory region.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

参数

obj
Object Object Object Object

要比较的对象。The object to compare.

返回

如果当前实例与 obj 相等,则为 true;否则为 falsetrue if the current instance and obj are equal; otherwise, false.

Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>) Equals(ReadOnlyMemory<T>)

确定当前实例与指定的 ReadOnlyMemory<T> 对象是否相等。Determines whether the current instance and a specified ReadOnlyMemory<T> objects are equal.

public:
 virtual bool Equals(ReadOnlyMemory<T> other);
public bool Equals (ReadOnlyMemory<T> other);
override this.Equals : ReadOnlyMemory<'T> -> bool
Public Function Equals (other As ReadOnlyMemory(Of T)) As Boolean

参数

other
ReadOnlyMemory<T> ReadOnlyMemory<T> ReadOnlyMemory<T> ReadOnlyMemory<T>

要比较的只读内存。The read-only memory to compare.

返回

如果当前实例与 other 相等,则为 true;否则为 falsetrue if the current instance and other are equal; otherwise, false.

实现

注解

[!IMPORTANT]

如果ReadOnlyMemory<T>内存区域指向同一阵列并具有相同的长度, 则两个对象相等。Two ReadOnlyMemory<T> objects are equal if the memory regions point to the same array and have the same length. 方法不检查内容是否相等。The method does not check to see if the contents are equal.

适用于