Which code segment should you use?

You are developing an application that includes a class named Employee and a generic list of employees. The
following code segment declares the list of employees:List<Employee> employeesList = new List<Employee>();
You populate the employeesList object with several hundred Employee objects.
The application must display the data for five Employee objects at a time.
You need to create a method that will return the correct number of Employee objects.
Which code segment should you use?

You are developing an application that includes a class named Employee and a generic list of employees. The
following code segment declares the list of employees:List<Employee> employeesList = new List<Employee>();
You populate the employeesList object with several hundred Employee objects.
The application must display the data for five Employee objects at a time.
You need to create a method that will return the correct number of Employee objects.
Which code segment should you use?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Denis

Denis

Incorrect question?

JS1985

JS1985

don’t see what’s wrong.
You have to understand that you have to pass in 5 as pageSize, and each next call you have to increment page.
Page(source, 1, 5);
Page(source, 2, 5);
Page(source, 3, 5);
Page(source, 4, 5);
Etcetera.