コード例 #1
0
        public void AddEmployeeDetailsUsingThreads()
        {
            Stopwatch stopwatch = new Stopwatch();
            EmployeePayrollOperations employeePayrollOperations = new EmployeePayrollOperations();
            Thread thr = new Thread(new ThreadStart(employeePayrollOperations.AddEmployeeDetails));

            thr.Start();
        }
コード例 #2
0
        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();
        }