public void AddEmployeeDetailsUsingThreads() { Stopwatch stopwatch = new Stopwatch(); EmployeePayrollOperations employeePayrollOperations = new EmployeePayrollOperations(); Thread thr = new Thread(new ThreadStart(employeePayrollOperations.AddEmployeeDetails)); thr.Start(); }
static void Main(string[] args) { Console.WriteLine("Employee Payroll using Threads"); EmployeePayrollOperations employeePayrollOperations = new EmployeePayrollOperations(); employeePayrollOperations.AddEmployeeDetails(); employeePayrollOperations.AddEmployeeDetailsUsingThreads(); int result = employeePayrollOperations.EmployeeCount(); Console.WriteLine(result); //employeePayrollOperations.UpdateEmployee(); }