ArraySegment<T>.Equals ArraySegment<T>.Equals ArraySegment<T>.Equals ArraySegment<T>.Equals Method

定义

确定两个对象是否相等。Determines whether two objects are equal.

重载

Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>)

确定指定的 ArraySegment<T> 结构是否等于当前实例。Determines whether the specified ArraySegment<T> structure is equal to the current instance.

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

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

Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>) Equals(ArraySegment<T>)

确定指定的 ArraySegment<T> 结构是否等于当前实例。Determines whether the specified ArraySegment<T> structure is equal to the current instance.

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

参数

obj
ArraySegment<T> ArraySegment<T> ArraySegment<T> ArraySegment<T>

要与当前实例进行比较的结构。The structure to compare with the current instance.

返回

如果指定的 ArraySegment<T> 结构等于当前实例,则为 true;否则为 falsetrue if the specified ArraySegment<T> structure is equal to the current instance; otherwise, false.

注解

如果ArraySegment<T>满足以下所有条件,则将两个对象视为相等:Two ArraySegment<T> objects are considered to be equal if all the following conditions are met:

  • 它们引用相同的数组。They reference the same array.

  • 它们从数组中的同一索引开始。They begin at the same index in the array.

  • 它们具有相同数量的元素。They have the same number of elements.

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

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

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

返回

如果指定的对象为 ArraySegment<T> 结构并且等于当前实例,则为 true;否则为 falsetrue if the specified object is a ArraySegment<T> structure and is equal to the current instance; otherwise, false.

注解

如果ArraySegment<T>满足以下所有条件,则将两个对象视为相等:Two ArraySegment<T> objects are considered to be equal if all the following conditions are met:

  • 它们引用相同的数组。They reference the same array.

  • 它们从数组中的同一索引开始。They begin at the same index in the array.

  • 它们具有相同数量的元素。They have the same number of elements.

适用于