Created
June 2, 2015 19:54
-
-
Save elberthcabrales/1bbbe022b26d3306f1e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//metodo | |
private void EditarLista() | |
{ | |
List<Movies> lstest = new List<Movies> { | |
new Movies(){Titulo="TROLL", Genero="Terror"}, | |
new Movies(){Titulo="IRON", Genero="ACTION"}, | |
new Movies(){Titulo="CRY", Genero="DRAMA"}, | |
new Movies(){Titulo="SIN CIRY", Genero="DRAMA"}, | |
new Movies(){Titulo="10 MM", Genero="DRAMA"}, | |
new Movies(){Titulo="ORIGEN", Genero="DRAMA"} | |
}; | |
lstest.Where(x => x.Genero == "DRAMA").ToList().ForEach(tt => tt.Titulo = "ACCION"); | |
} | |
//clase | |
public class Movies | |
{ | |
private string titulo; | |
public string Titulo | |
{ | |
get { return titulo; } | |
set { titulo = value; } | |
} | |
private string genero; | |
public string Genero | |
{ | |
get { return genero; } | |
set { genero = value; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment