Given the normal Console in C#, the task is to check if the NUM LOCK is on or off through Console.
Approach: This can be done using the NumberLock property in the Console class of the System package in C#. This property gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.
Program 1: When the NUM LOCK is on
Program 2: When the NUM LOCK is off
- C# | Check if Caps Lock is on or off through Console
- C# | Check if Output is Redirected on the Console or not
- C# | Check if Input is Redirected on the Console or not
- C# | Check if Error is Redirected on the Console or not
- Console Class in C#
- C# | How to change the CursorSize of the Console
- Console.ResetColor() Method in C#
- Console.KeyAvailable() Property in C#
- Console.ReadKey() Method in C#
- C# | How to change the CursorTop of the Console
- Console.SetBufferSize() Method in C#
- C# | How to change the WindowHeight of the Console
- C# | How to change Title of the Console
- C# | How to change BufferWidth of the Console
- C# | How to change BufferHeight of the Console
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.