static void Main(string[] args)
        {
            //Demo oRecipe = new Demo();
            //var backgroundThread = new Thread(oRecipe.DoBackgroundTask);
            //backgroundThread.IsBackground = true;
            //backgroundThread.Priority = ThreadPriority.Lowest;
            //backgroundThread.Start();
            //Thread.Sleep(5000);

            //Demo oRecipe = new Demo();
            //oRecipe.IncreaseThreadPoolSize();

            //Demo oRecipe = new Demo();
            //oRecipe.MultipleThreadWait();

            Demo oRecipe = new Demo();

            oRecipe.LockThreadExample();

            //Demo oRecipe = new Demo();
            //oRecipe.ParallelInvoke();

            //List<string> integerList = new List<string>();
            //for (int i = 0; i <= 500; i++)
            //{
            //    integerList.Add(i.ToString());
            //}
            //Demo oRecipe = new Demo();
            //double timeElapsed1 = oRecipe.ReadCollectionForEach(integerList);
            //double timeElapsed2 = oRecipe.ReadCollectionParallelForEach(integerList);
            //WriteLine($"foreach executed in {timeElapsed1}");
            //WriteLine($"Parallel.ForEach executed in {timeElapsed2}");

            //List<string> integerList = new List<string>();
            //for (int i = 0; i <= 1000; i++)
            //{
            //    integerList.Add(i.ToString());
            //}

            //Demo oRecipe = new Demo();
            //oRecipe.CreateWriteFilesForEach(integerList);
            //oRecipe.CreateWriteFilesParallelForEach(integerList);


            //List<string> integerList = new List<string>();
            //for (int i = 0; i <= 1000; i++)
            //{
            //    integerList.Add(i.ToString());
            //}

            //Demo oRecipe = new Demo();
            //oRecipe.CancelParallelForEach(integerList, 5);
            //WriteLine($"Parallel.ForEach loop terminated");

            //List<string> ipList = new List<string>();
            //for (int i = 0; i <= 10; i++)
            //{
            //    ipList.Add($"10.0.0.{i.ToString()}");
            //}

            //try
            //{
            //    Demo oRecipe = new Demo();
            //    oRecipe.CheckClientMachinesOnline(ipList, 2);
            //}
            //catch (Exception ex)
            //{
            //    WriteLine(ex.InnerException.Message);
            //}



            WindowHeight = 18;
            WindowWidth  = 62;
            ReadLine();
        }