Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Checking for Num Lock key enabled or not in C#

The Console.NumberLock property, like the Console.CapsLock property, provides a way to determine if a keyboard key is pressed.

using System;
using System.Threading;

namespace forgetCode
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.NumberLock);            
        }

    }
}


Output:
True or false

..