Exemplo n.º 1
0
            static void Main(string[] args)
            {
                User Ivan  = new EmployeeBuilder().setName("Ivan").setCompany("None").setAge(23);
                User Petro = new EmployeeBuilder().setName("Petro").isMarried.setAge(88);

                WriteLine(Ivan);
                WriteLine(Petro);
            }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var employee = new EmployeeBuilder()
                           .SetName("Chen Kim")
                           .SetPosition(".NET Developer")
                           .SetSalary(20)
                           .Build();

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