This documentation is archived and is not being maintained.

ConsoleKeyInfo Members

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.

The ConsoleKeyInfo type exposes the following members.

  NameDescription
Public method ConsoleKeyInfo Initializes a new instance of the ConsoleKeyInfo structure using the specified character, console key, and modifier keys.
Top

  NameDescription
Public method Equals Overloaded. Gets a value indicating whether an object or specified ConsoleKeyInfo object is equal to the current ConsoleKeyInfo object.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code for the current ConsoleKeyInfo object. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

  NameDescription
Public operator Static member Equality Indicates whether the specified ConsoleKeyInfo objects are equal.
Public operator Static member Inequality Indicates whether the specified ConsoleKeyInfo objects are not equal.
Top

  NameDescription
Public property Key Gets the console key represented by the current ConsoleKeyInfo object.
Public property KeyChar Gets the Unicode character represented by the current ConsoleKeyInfo object.
Public property Modifiers Gets a bitwise combination of System.ConsoleModifiers values that specifies one or more modifier keys pressed simultaneously with the console key.
Top
Show: