Esempio n. 1
0
        public void GetAnswer(Questions12 svaret)
        {
            String SVAR = Console.ReadLine();

            if (SVAR == svaret.answer)
            {
                Console.WriteLine("Rätt!");
            }

            else
            {
                Console.WriteLine("Fel!");
            }
        }
Esempio n. 2
0
        static void shuffle()
        {
            Random random = new Random();
            int    tal1;
            int    tal2;

            for (int i = 0; i < 10; i = i + 1)
            {
                tal1 = random.Next(fragor.Count);
                tal2 = random.Next(fragor.Count);
                Questions12 temp = fragor [tal1];
                fragor [tal1] = fragor [tal2];
                fragor [tal2] = temp;
            }
        }