ReadOnlySpan<T>.Inequality(ReadOnlySpan<T>, ReadOnlySpan<T>) 运算符

定义

返回一个值,该值指示两个 ReadOnlySpan<T> 实例是否不相等。Returns a value that indicates whether two ReadOnlySpan<T> instances are not equal.

public:
 static bool operator !=(ReadOnlySpan<T> left, ReadOnlySpan<T> right);
public static bool operator != (ReadOnlySpan<T> left, ReadOnlySpan<T> right);
static member op_Inequality : ReadOnlySpan<'T> * ReadOnlySpan<'T> -> bool
Public Shared Operator != (left As ReadOnlySpan(Of T), right As ReadOnlySpan(Of T)) As Boolean

参数

left
ReadOnlySpan<T>

要比较的第一个只读范围。The first read-only span to compare.

right
ReadOnlySpan<T>

要比较的第二个只读范围。The second read-only span to compare.

返回

Boolean

如果这两个 ReadOnlySpan<T> 实例不相等,则为 true;否则为 falsetrue if the two ReadOnlySpan<T> instances are not equal; otherwise, false.

注解

如果两个 ReadOnlySpan<T> 实例具有不同的长度或的相应元素 leftright 指向不同的内存位置,则这两个实例不相等。Two ReadOnlySpan<T> instances are not equal if they have different lengths or if the corresponding elements of left and right point to different memory locations.

适用于