Пример #1
0
 public bool Modificar(ListaJugador Coleccion,
                       string nickname, string password, string email)
 {
     if (Coleccion.Exists(c => c.Nickname.Equals(nickname)))
     {
         Coleccion.First(n => n.Nickname.Equals(nickname)).Nickname   = nickname;
         Coleccion.First(n => n.Nickname.Equals(nickname)).Mail       = email;
         Coleccion.First(n => n.Nickname.Equals(nickname)).Contrasena = password;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 public bool Eliminar(ListaJugador Coleccion,
                      string nick)
 {
     if (Coleccion.Exists(c => c.Nickname.Equals(nick)))
     {
         Coleccion.Remove(Coleccion.First(n => n.Nickname.Equals(nick)));
         return(true);
     }
     else
     {
         return(false);
     }
 }