public void loadsubjects(ref StreamReader reader) { int numberofsubjets = int.Parse(reader.ReadLine()); for (int i = 0; i != numberofsubjets; i++) { subject a = new subject(); a.loadname(ref reader); a.loadexams(ref reader); a.locadcoursework(ref reader); subjects.Add(a); } }
private void button9_Click(object sender, EventArgs e) { // add subject if (selectedyear != -1) { subject a = new subject(); a.setname(Interaction.InputBox("please enter a name for subject", "subject name", years[selectedyear].getsize().ToString())); years[selectedyear].addsubject(a); updatesubjects(); } else MessageBox.Show("please select a year"); }
public void addsubject(subject item) { subjects.Add(item); }