Exemplo n.º 1
0
        protected virtual void OnSameLastNameFinded(FindSameLastNameEventArgs e)
        {
            EventHandler <FindSameLastNameEventArgs> handler = SameLastNameFinded;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 2
0
 public void FindSameLastNames(List <User> users)
 {
     foreach (User user in users)
     {
         if (users.Any(u => u.LastName == user.LastName))
         {
             FindSameLastNameEventArgs args = new FindSameLastNameEventArgs();
             OnSameLastNameFinded(args);
         }
     }
 }
Exemplo n.º 3
0
 static void c_SameLastNameFinded(User user, FindSameLastNameEventArgs e)
 {
     Console.WriteLine(user.LastName);
 }