Beispiel #1
0
        //-------------------------------------------------------------
        static void Str_matr_comp()
        {
            Console.WriteLine("Compare codes");

            Console.WriteLine("Please, write key from 1 to 35 :");
            int          b         = int.Parse(Console.ReadLine());
            Morse_matrix code_tbl1 = new Morse_matrix(b);

            Console.WriteLine("Please, write key from 1 to 35 :");
            int          d         = int.Parse(Console.ReadLine());
            Morse_matrix code_tbl2 = new Morse_matrix(Alphabet.Dictionary_arr, d);

            Console.WriteLine("Code 1 ");
            code_tbl1.Write_matrix();
            Console.WriteLine("Code 2 ");
            code_tbl2.Write_matrix();

            if (code_tbl1.Equals(code_tbl2))
            {
                Console.WriteLine("True");
            }
            else
            {
                Console.WriteLine("False");
            }
        }