static void SaveFile(string filename, List <TriviaQuestion> Questions) { try { using (StreamWriter fout = new StreamWriter(filename)) { for (int index = 0; index < Questions.Count; index++) { TriviaQuestion temp = Questions[index]; fout.WriteLine("{0},{1},{2},{3},{4},{5}", temp.GetQuestion(), temp.GetQuestion1(), temp.GetQuestion2(), temp.GetQuestion3(), temp.GetQuestion4(), temp.GetAnswer()); } } } catch (Exception e) { Console.WriteLine("File save failed for: {0}", filename); } }
static void ShowDeleteItem(TriviaQuestion Questions, int Dcount) { Console.WriteLine("{0} {1}", Dcount, Questions.GetQuestion()); }