Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Equality Operator
Collapse the table of content
Expand the table of content

ConsoleKeyInfo.Equality Operator

Indicates whether the specified ConsoleKeyInfo objects are equal.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static bool operator ==(
	ConsoleKeyInfo a,
	ConsoleKeyInfo b
)

Parameters

a
Type: System.ConsoleKeyInfo

The first object to compare.

b
Type: System.ConsoleKeyInfo

The second object to compare.

Return Value

Type: System.Boolean
true if a is equal to b; otherwise, false.

Two ConsoleKeyInfo objects are equal if their corresponding KeyChar, Key, and Modifiers properties are equal.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft