exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 55 discussion

Actual exam question from Microsoft's 70-483
Question #: 55
Topic #: 2
[All 70-483 Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
supersunny
Highly Voted 5 years, 10 months ago
B is the answer
upvoted 20 times
ArunPrem
5 years, 1 month ago
That is what already given as an answer. Try to give some better explanation if you have any/known much about the topic so that it would help or easy in understanding it.
upvoted 4 times
Ragou
5 years ago
A and C are not suitable extension method => you can only use them with IEnumerable<int> D use Take before Skip => So you will just take the "n" fisrt entries of the collection and the Skip will withdraw element of the take IEnumerable return.
upvoted 1 times
Mona30
4 years, 11 months ago
also its using a static method, so needs to have "this" keyword
upvoted 1 times
...
...
mmarinov
5 years, 1 month ago
For example: You want to get Page #3, your previous pages contain 10 elements: source.skip(page-1) * pageSize - that will skip the previous two pages (2 pages *10 elements = skipping 20 elements .Take(pageSize) - will take the elements needed for the third page. - the elements from 20 to 30 :)
upvoted 16 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...