Memory<T>.Equals Memory<T>.Equals Memory<T>.Equals Memory<T>.Equals Method

定义

重载

Equals(Memory<T>) Equals(Memory<T>) Equals(Memory<T>) Equals(Memory<T>)

确定指定的 Memory<T> 对象是否等于当前对象。Determines whether the specified Memory<T> object is equal to the current object.

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

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

Equals(Memory<T>) Equals(Memory<T>) Equals(Memory<T>) Equals(Memory<T>)

确定指定的 Memory<T> 对象是否等于当前对象。Determines whether the specified Memory<T> object is equal to the current object.

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

参数

other
Memory<T> Memory<T> Memory<T> Memory<T>

要与当前实例进行比较的对象。The object to compare with the current instance.

返回

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

注解

两个对象相等,如果:The two objects are equal if:

Equals(Memory<T>)方法执行引用相等性测试; 它不会比较的元素Memory<T>是否相等。The Equals(Memory<T>) method performs a test for reference equality; it does not compare the elements of Memory<T> for equality.

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

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

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 with the current instance.

返回

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

注解

两个Memory<T>对象相等,如果这两个对象指向同一数组,并且具有相同的长度。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.

适用于