共用方式為


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

要比較的第二個物件。

傳回

如果 true 不等於 a,則為 b,否則為 false

備註

如果兩 ConsoleKeyInfo 個 物件的對應 KeyCharKeyModifiers 屬性相等,則兩個 物件相等。

適用於