-
-
Save jesuscampos/cd82327a3c756e38a5a4bca8bf140649 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
class Persona | |
{ | |
public Persona SetNombre(string nombre) | |
{ | |
this.Nombre = nombre; | |
return this; // retorna el propio objeto | |
} | |
public Persona SetEdad(int edad) | |
{ | |
this.Edad = edad; | |
return this; // retorna el propio objeto | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment