public CarrotCakePrototype GetPrototype1() { CarrotCakePrototype carrotCake = new CarrotCakePrototype(); carrotCake.SecretIngredient = "carrot"; return(carrotCake); }
public CarrotCakePrototype GetPrototype2(CarrotCakePrototype prototype1) { CarrotCakePrototype newCarrotCake = (CarrotCakePrototype)prototype1.Clone(); return(newCarrotCake); // now we have two delicious carrot cakes, without having to // initialise / perform operations on two instances. }