mscorlib(4.0.0.0) API with additions
|
Describes the console key that was pressed, including the character represented by the console key and the state of the SHIFT, ALT, and CTRL modifier keys. More...
Public Member Functions | |
ConsoleKeyInfo (char keyChar, ConsoleKey key, bool shift, bool alt, bool control) | |
Initializes a new instance of the T:System.ConsoleKeyInfo structure using the specified character, console key, and modifier keys. More... | |
override bool | Equals (object value) |
Gets a value indicating whether the specified object is equal to the current T:System.ConsoleKeyInfo object. More... | |
bool | Equals (ConsoleKeyInfo obj) |
Gets a value indicating whether the specified T:System.ConsoleKeyInfo object is equal to the current T:System.ConsoleKeyInfo object. More... | |
override int | GetHashCode () |
Returns the hash code for the current T:System.ConsoleKeyInfo object. More... | |
Static Public Member Functions | |
static bool | operator== (ConsoleKeyInfo a, ConsoleKeyInfo b) |
Indicates whether the specified T:System.ConsoleKeyInfo objects are equal. More... | |
static bool | operator != (ConsoleKeyInfo a, ConsoleKeyInfo b) |
Indicates whether the specified T:System.ConsoleKeyInfo objects are not equal. More... | |
Public Attributes | |
char | KeyChar => _keyChar |
Gets the Unicode character represented by the current T:System.ConsoleKeyInfo object. More... | |
ConsoleKey | Key => _key |
Gets the console key represented by the current T:System.ConsoleKeyInfo object. More... | |
ConsoleModifiers | Modifiers => _mods |
Gets a bitwise combination of T:System.ConsoleModifiers values that specifies one or more modifier keys pressed simultaneously with the console key. More... | |
Describes the console key that was pressed, including the character represented by the console key and the state of the SHIFT, ALT, and CTRL modifier keys.
Definition at line 5 of file ConsoleKeyInfo.cs.
System.ConsoleKeyInfo.ConsoleKeyInfo | ( | char | keyChar, |
ConsoleKey | key, | ||
bool | shift, | ||
bool | alt, | ||
bool | control | ||
) |
Initializes a new instance of the T:System.ConsoleKeyInfo structure using the specified character, console key, and modifier keys.
keyChar | The Unicode character that corresponds to the key parameter. |
key | The console key that corresponds to the keyChar parameter. |
shift | true to indicate that a SHIFT key was pressed; otherwise, false . |
alt | true to indicate that an ALT key was pressed; otherwise, false . |
control | true to indicate that a CTRL key was pressed; otherwise, false . |
T:System.ArgumentOutOfRangeException | The numeric value of the key parameter is less than 0 or greater than 255. |
Definition at line 35 of file ConsoleKeyInfo.cs.
override bool System.ConsoleKeyInfo.Equals | ( | object | value | ) |
Gets a value indicating whether the specified object is equal to the current T:System.ConsoleKeyInfo object.
value | An object to compare to the current T:System.ConsoleKeyInfo object. |
true
if value is a T:System.ConsoleKeyInfo object and is equal to the current T:System.ConsoleKeyInfo object; otherwise, false
.Definition at line 62 of file ConsoleKeyInfo.cs.
bool System.ConsoleKeyInfo.Equals | ( | ConsoleKeyInfo | obj | ) |
Gets a value indicating whether the specified T:System.ConsoleKeyInfo object is equal to the current T:System.ConsoleKeyInfo object.
obj | An object to compare to the current T:System.ConsoleKeyInfo object. |
true
if obj is equal to the current T:System.ConsoleKeyInfo object; otherwise, false
.Definition at line 75 of file ConsoleKeyInfo.cs.
override int System.ConsoleKeyInfo.GetHashCode | ( | ) |
Returns the hash code for the current T:System.ConsoleKeyInfo object.
Definition at line 106 of file ConsoleKeyInfo.cs.
|
static |
Indicates whether the specified T:System.ConsoleKeyInfo objects are not equal.
a | The first object to compare. |
b | The second object to compare. |
true
if a is not equal to b ; otherwise, false
.Definition at line 99 of file ConsoleKeyInfo.cs.
|
static |
Indicates whether the specified T:System.ConsoleKeyInfo objects are equal.
a | The first object to compare. |
b | The second object to compare. |
true
if a is equal to b ; otherwise, false
.Definition at line 89 of file ConsoleKeyInfo.cs.
ConsoleKey System.ConsoleKeyInfo.Key => _key |
Gets the console key represented by the current T:System.ConsoleKeyInfo object.
Definition at line 19 of file ConsoleKeyInfo.cs.
char System.ConsoleKeyInfo.KeyChar => _keyChar |
Gets the Unicode character represented by the current T:System.ConsoleKeyInfo object.
Definition at line 15 of file ConsoleKeyInfo.cs.
ConsoleModifiers System.ConsoleKeyInfo.Modifiers => _mods |
Gets a bitwise combination of T:System.ConsoleModifiers values that specifies one or more modifier keys pressed simultaneously with the console key.
Definition at line 23 of file ConsoleKeyInfo.cs.