They ask me to create a Race and an Athlete class, and show some data by console. In the Career Class I have to create a method that orders the contestants alphabetically. I tried to take the first and last, and it's all good. My problem is now:
public void ordenarPorNombre()
{
this.Competidores.OrderBy(x => x.getNombre()).Last().DatosAtleta();
}
There I'm trying to get the last one, and it works, but I need you to show all in alphabetical order ... I guess I should just take the Last () and put another word that does, but I do not know what it is ...
Thanks in advance.