Skip to content

Instantly share code, notes, and snippets.

@elberthcabrales
Created June 2, 2015 19:54
Show Gist options
  • Save elberthcabrales/1bbbe022b26d3306f1e6 to your computer and use it in GitHub Desktop.
Save elberthcabrales/1bbbe022b26d3306f1e6 to your computer and use it in GitHub Desktop.
//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