    class PriorityTest
    {
        bool loopSwitch;
        public PriorityTest()
        {
            loopSwitch = true;
        }
        public bool LoopSwitch
        {
            set { loopSwitch = value; }
        }
        public void ThreadMethod()
        {
            long threadCount = 0;

            while (loopSwitch)
            {
                threadCount++;
            }
            Console.WriteLine("{0} with {1,11} priority " +
                "has a count = {2,13}", Thread.CurrentThread.Name,
                Thread.CurrentThread.Priority.ToString(),
                threadCount.ToString("N0"));
        }
    }
