Ejemplo n.º 1
0
 protected virtual void OnStudentAdded(Students students)
 {
     if (StudentAdded != null)
     {
         PersonEventArgs personEventArgs = new PersonEventArgs();
         personEventArgs.Name = students.Name;
         personEventArgs.Age  = students.Age;
         StudentAdded(this, personEventArgs);
     }
 }
Ejemplo n.º 2
0
 public void OnStudentAdded(object source, PersonEventArgs args)
 {
     Console.WriteLine("A new student was added: " + args.Name);
 }