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:
 virtual 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:

  • @no__t 为 @no__t 或 @no__t 2 对象。other is a Memory<T> or ReadOnlyMemory<T> object.

  • 这两个对象都指向同一数组,并且具有相同的长度。Both objects point to the same array and have the same length.

@No__t-0 方法执行引用相等性的测试;它不会比较 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.

注解

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

适用于