This file contains 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
extracted from : https://stackoverflow.com/questions/38575646/general-purpose-immutable-classes-in-c-sharp | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var immutable1 = new A(3, 4, new Batida(name: "juan", lastname: "Doe")); | |
var immutable2 = immutable1.With( Batida: new Batida("Roger", "Tan")); |