VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/c-sharp-check-if-num-lock-is-on-or-off-through-console/

⇱ C# | Check if Num Lock is on or off through Console - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C# | Check if Num Lock is on or off through Console

Last Updated : 28 Jan, 2019
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 Output: 👁 Image
Program 2: When the NUM LOCK is off
Output: 👁 Image
Comment
Article Tags:

Explore