Example #1
0
        static void Main(string[] args)
        {
            RandomGenStruct rgs = new RandomGenStruct();

            rgs.LoadAll("Book.txt");
            //            rgs.Write();
            while (true)
            {
                try {
                    Console.WriteLine(rgs.GenerateSentence());
                    Console.ReadKey();
                }
                catch (KeyNotFoundException knfe) {
                    Console.WriteLine(knfe.Data);
                }
            }
        }
        static void Main(string[] args)
        {
            RandomGenStruct rgs = new RandomGenStruct();
            rgs.LoadAll("Book.txt");
             //            rgs.Write();
            while(true) {
                try {
                    Console.WriteLine(rgs.GenerateSentence());
                    Console.ReadKey();
                }
                catch(KeyNotFoundException knfe) {
                    Console.WriteLine(knfe.Data);

                }

            }
        }