Span<T>.Equality(Span<T>, Span<T>) 运算符
定义
public:
static bool operator ==(Span<T> left, Span<T> right);
public static bool operator == (Span<T> left, Span<T> right);
static member ( = ) : Span<'T> * Span<'T> -> bool
Public Shared Operator == (left As Span(Of T), right As Span(Of T)) As Boolean
参数
- left
- Span<T>
要比较的第一个范围。The first span to compare.
- right
- Span<T>
要比较的第二个范围。The second span to compare.
返回
如果两个 Span<T> 对象相等,则为 true;否则为 false。true if the two Span<T> objects are equal; otherwise, false.
注解
如果两个 Span<T> 对象具有相同的长度和对应的元素 left ,并且 right 指向相同的内存,则这两个对象相等。Two Span<T> objects are equal if they have the same length and the corresponding elements of left and right point to the same memory. 请注意,相等性测试 不 会尝试确定内容是否相等。Note that the test for equality does not attempt to determine whether the contents are equal.