採用:
public class Person {
public event EventHandler myevent;
public Person() {
}
}
public class Student : Person
{
public Student() {
base.myevent += new EventHandler(Student_myevent);
Student_myevent(this, null);
}
void Student_myevent(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
Person p = new Student();
点醒我了 没想到从基类出发 派生类构造是在基类构造完成之前构造的
如果不能够很清楚的描述问题,你最好贴上你(已有)的代码。