示例#1
0
        static void Main(string[] args)
        {
            var builder = new CustomerBuilder();

            builder.AssignCustomerNumber(321123)
            .AssignFirstName("Dude")
            .AssignLastName("McGuy");

            //preform action to get/calculate age from elsewhere
            var age = 22;

            builder.AssignAge(age);

            var customer = builder.Build();

            Console.WriteLine(customer.ToString());
        }