windows forms designer - C# Null reference exception and StreamReader -
i getting null reference exception when reading data txt file. public class appointments : list<appointment> { appointment appointment; public appointments() { } public bool load(string filename) { string appointmentdata = string.empty; using (streamreader reader = new streamreader(filename)) { while((appointmentdata = reader.readline()) != null) { appointmentdata = reader.readline(); //**this null ref. exception thrown** (line below) if(appointmentdata[0] == 'r') { appointment = new recurringappointment(appointmentdata); } else { appointment = new appointment(appointmentda...