Exemple #1
0
 public Professor(Student student)
 {
     _student = student;
     _student.startedWork += StartedWork;
     _student.working += Working;
     _student.finishedWorking += FinishedWorking;
 }
Exemple #2
0
 static void Main(string[] args)
 {
     Student Jim = new Student();
     using (Professor Breedlove = new Professor(Jim))
     using (Spouse Sally = new Spouse(Jim))
     {
         Jim.DoWork();
         //Jim.finishedWorking();
     }
 }
Exemple #3
0
 public Spouse(Student student)
 {
     _student = student;
     _student.startedWork += StartedWork;
     _student.finishedWorking += FinishedWorking;
 }