ArraySegment<T>.Equality(ArraySegment<T>, ArraySegment<T>) 操作员

定义

指示两个 ArraySegment<T> 结构是否相等。Indicates whether two ArraySegment<T> structures are equal.

public:
 static bool operator ==(ArraySegment<T> a, ArraySegment<T> b);
public static bool operator == (ArraySegment<T> a, ArraySegment<T> b);
static member ( = ) : ArraySegment<'T> * ArraySegment<'T> -> bool
Public Shared Operator == (a As ArraySegment(Of T), b As ArraySegment(Of T)) As Boolean

参数

a
ArraySegment<T>

相等运算符左侧的结构。The structure on the left side of the equality operator.

b
ArraySegment<T>

相等运算符右侧的结构。The structure on the right side of the equality operator.

返回

如果 true 等于 a,则为 b;否则为 falsetrue if a is equal to b; 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.

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

此运算符的等效方法是 ArraySegment<T>.Equals(ArraySegment<T>)The equivalent method for this operator is ArraySegment<T>.Equals(ArraySegment<T>)

适用于