예제 #1
0
        static void Main(string[] args)
        {
            List <Employee> employeeList = new List <Employee>()
            {
                new Employee()
                {
                    id = 1, name = "Ankith", Mname = "Naga", dept = "IT", salary = 50000
                },
                new Employee()
                {
                    id = 2, name = "Harshith", Mname = "Deepa", dept = "HR", salary = 40000
                },
                new Employee()
                {
                    id = 3, name = "Alok", Mname = "Rohith", dept = "Sales", salary = 80000
                },
                new Employee()
                {
                    id = 4, name = "Megha", Mname = "Sudheer", dept = "IT", salary = 10000
                },
                new Employee()
                {
                    id = 5, name = "Deeksha", Mname = "Ayan", dept = "IT", salary = 8000
                },
                new Employee()
                {
                    id = 6, name = "Arun", Mname = "Mohith", dept = "Account", salary = 5000
                },
                new Employee()
                {
                    id = 7, name = "Prasad", Mname = "Naga", dept = "IT", salary = 70000
                },
                new Employee()
                {
                    id = 8, name = "Tarun", Mname = "Sudheer", dept = "IT", salary = 50000
                },
                new Employee()
                {
                    id = 9, name = "Monish", Mname = "Mohith", dept = "Account", salary = 60000
                },
                new Employee()
                {
                    id = 10, name = "Kavya", Mname = "Mohith", dept = "Account", salary = 50000
                },
            };
            Employee empl = new Employee();

            empl.DisplayDetails(employeeList);
            empl.MaxSalary(employeeList);
            empl.MinSalary(employeeList);
            empl.TotalSalary(employeeList);
            empl.AverageSalary(employeeList);
            empl.DisplayEmployee(employeeList);
            empl.NoOfDepartment(employeeList);
            empl.HrEmp(employeeList);
            empl.NameFinding(employeeList);
            Console.ReadKey();
        }