public class Teacher{
public string imageUrl;
public TeacherEducationalQualification[] teacherEducationalQualification;
}
public class TeacherEducationalQualification{
public string NameOfDegree;
public string NameOfUniversity;
public int YearOfGraduation;
}
In the above codes when I instantiate Teacher class like
Teacher teacher= new Teacher();
This works fine but when I instantiate array in Teacher class for object 'teacher'
teacher.teacherEducationalQualification = new TeacherEducationalQualification[5];
It gives me an error 'Object reference not set to an instance of an object' whenever i try to access any variable to set values in it.
teacher.teacherEducationalQualification[1].NameOfDegree= "abc";
Please Help.