ConsoleKeyInfo.Inequality(ConsoleKeyInfo, ConsoleKeyInfo) 运算符

定义

指示指定的 ConsoleKeyInfo 对象是否不相等。

public:
 static bool operator !=(ConsoleKeyInfo a, ConsoleKeyInfo b);
public static bool operator != (ConsoleKeyInfo a, ConsoleKeyInfo b);
static member op_Inequality : ConsoleKeyInfo * ConsoleKeyInfo -> bool
Public Shared Operator != (a As ConsoleKeyInfo, b As ConsoleKeyInfo) As Boolean

参数

a
ConsoleKeyInfo

要比较的第一个对象。

b
ConsoleKeyInfo

要比较的第二个对象。

返回

Boolean

如果 true 不等于 a,则为 b;否则为 false

注解

如果 ConsoleKeyInfo 两个对象相 KeyChar等,则两个对象相等, Key并且 Modifiers 属性相等。

适用于