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
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.