oQual是一个类变量,它被分配给下面代码中显示的其中一个参数,问题是如果在运行时观察这个变量它已经填充了正确的值但是我在评论中得到NULLReference异常线。
Programme oPrograme;
private Qualification oQual;
public ProgrammeList(Qualification oQualification)
{
oPrograme = new Programme();
oQual = new Qualification();
oQual = oQualification;
this.tQID.Text = oQual.getQualficationID().ToString(); //oQual is already populated yet i am getting null reference expection on this line
this.tProgName.Text = oQual.getQualificationName();
this.tProg_Saqa_reg_no.Text = oQual.getQualificationNqfLevel();
this.tProg_nqf_level.Text = oQual.getQualificationSaqaNo();
}
protected void Page_Load(object sender, EventArgs e)
{
}