static void Main(string[] args) { var eb = new EmployeeBuilder(); var employee = eb.Called("Ali").WorksAsA("Engineer"); Console.WriteLine(employee); Console.ReadLine(); }
public static EmployeeBuilder WorksAsA(this EmployeeBuilder employeeBuilder, string position) { employeeBuilder.Actions.Add(e => { e.Position = position; }); return(employeeBuilder); }