• Top Posts

    c# program for number lock status

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;

    namespace ConsoleApplication5
    {
        class Program
        {
            static void Main()
            {
                while (true)
                {
                    Thread.Sleep(1000);
                    bool capsLock = Console.NumberLock;
                    Console.WriteLine(capsLock);
                }
            }
        }
    }

    result:

    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728