Which code segment should you use?

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


A. Option A
B. Option B
C. Option C
D. Option D

microsoft-exams

2 thoughts on “Which code segment should you use?

  1. correct answer is:

    public static IEnumerable Page(this IEnumerable source, int page, int pageSize)
    {
    return source.Skip((page – 1) * pageSize).Take(pageSize);
    }

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.