Single.Equality(Single, Single) 操作员

定义

返回一个值,该值指示两个指定的 Single 值是否相等。Returns a value that indicates whether two specified Single values are equal.

public:
 static bool operator ==(float left, float right);
public static bool operator == (float left, float right);
static member ( = ) : single * single -> bool
Public Shared Operator == (left As Single, right As Single) As Boolean

参数

left
Single

要比较的第一个值。The first value to compare.

right
Single

要比较的第二个值。The second value to compare.

返回

如果 leftright 相等,则为 true;否则为 falsetrue if left and right are equal; otherwise, false.

注解

Equality 方法定义 Single 值的相等运算符。The Equality method defines the equality operator for Single values.

适用于