Example #1
0
        static void Algorithm(Hashtable theLandscape)
        {
            var aReverseList = General.GetReversedHashtableKeys(theLandscape);

            int         max  = 0;
            BitVector32 maxS = new BitVector32(0);

            foreach (DictionaryEntry anEntry in aReverseList)
            {
                int aCurrentKey = (int)anEntry.Key;
                if (max < aCurrentKey)
                {
                    max  = aCurrentKey;
                    maxS = (BitVector32)theLandscape [aCurrentKey];
                    Console.WriteLine($"New max value is {max}");
                }
            }


            Console.WriteLine($"max : {max}");


            Console.Write("maxS : ");
            for (int i = 0; i < 32; i++)
            {
                Console.Write(Convert.ToInt32(maxS[i]));
            }
            Console.WriteLine("");
        }