}    //end of constructor

        public void Add(string question, string Answer)
        {
            Question_Answer ques_Ans = new Question_Answer();

            ques_Ans.ADD(question, Answer);
            string key = ques_Ans.question[0].ToUpper()[0].ToString();

            key = generatekey(key);
            collection.Add(key, ques_Ans);
        }    //end of overload Adding new question and answer in collection method
        }    //end of overload Adding new question and answer in collection method

        private void Add(Question_Answer q)
        {
            try
            {
                string key = q.question[0].ToUpper()[0].ToString();
                key = generatekey(key);
                collection.Add(key, q);
            }
            catch
            {
                string key = q.question[0].ToUpper().ToString();
                key = generatekey(key);
                collection.Add(key, q);
            }
        }    //end of add method()
 public void Write_Ans_In_File(StreamWriter sw, Question_Answer QandA)
 {
     for (int writeans = 0; writeans < QandA.answer.Count; writeans++)
     {
         if (writeans == QandA.answer.Count - 1)
         {
             sw.Write(QandA.answer[writeans]);
         }
         else
         {
             sw.Write(QandA.answer[writeans] + "|");
         }
     }
     sw.WriteLine();
 }
 public void write_Ques_InFile(StreamWriter sw, Question_Answer QandA)
 {
     for (int writeQues = 0; writeQues < QandA.question.Count; writeQues++)
     {
         if (writeQues == QandA.question.Count - 1)
         {
             sw.Write(QandA.question[writeQues]);
         }
         else
         {
             sw.Write(QandA.question[writeQues] + "|");
         }
     }
     sw.WriteLine();
 }
        }    //end of method()

        public void SaveAll()
        {
            File_Copy();

            StreamWriter writequestion = new StreamWriter(@"Questions.txt", true);
            StreamWriter writeanswer   = new StreamWriter(@"Answers.txt", true);

            int    num = 1, ascii = 65;
            string key   = MakeKeys(ascii);
            int    count = 0;

            while (count != collection.Count)
            {
                if (collection.ContainsKey(key))
                {
                    string innerkey = key;

                    while (collection.ContainsKey(innerkey))
                    {
                        Question_Answer QandA = new Question_Answer();
                        QandA = collection[innerkey];

                        QandA.write_Ques_InFile(writequestion, QandA);
                        QandA.Write_Ans_In_File(writeanswer, QandA);

                        innerkey = key;
                        innerkey = innerkey + num;
                        num++;
                        count++;
                    }
                }

                num = 1;
                ascii++;
                key = MakeKeys(ascii);
            }    //end of write all data in file

            writeanswer.Close();
            writequestion.Close();
        }    //end of saving all data
        }    //end of genreating key method()

        public void RetrieveDataFromFile()
        {
            StreamReader reader     = new StreamReader(@"Questions.txt", true);
            StreamReader ReadAnswer = new StreamReader(@"Answers.txt", true);

            while (reader.EndOfStream == false)
            {
                string   temp = "";
                string[] a;
                string[] b;

                temp = reader.ReadLine();
                a    = temp.Split('|');
                temp = ReadAnswer.ReadLine();
                b    = temp.Split('|');

                Question_Answer q = new Question_Answer();
                q.ADD(a, b);
                Add(q);
            }

            reader.Close();
            ReadAnswer.Close();
        }    //end of retrive data from file method