private void LoadExam() { Online_Exame exams = new Online_Exame(); var examQuest = exams.getExam_Question(examID); list = examQuest.ToList(); StudentAnswers = new Dictionary <int, string>(list.Count); // show Exam details var examInfo = (from e in exams.Exams where e.Ex_id == examID select e).First(); label1.Text = examInfo.Ex_Des.Trim(); label2.Text = examInfo.Duration.ToString() + "M"; }