exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 58 discussion

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

DRAG DROP -
You have an application that uses paging. Each page displays 10 items from a list.
You need to display the third page. (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Note:
Skip the first two page (first 20 items) then select the next page (next 10 items),
Use the Take operator to return a given number of elements in a sequence and then skip over the remainder.
Use the Skip operator to skip over a given number of elements in a sequence and then return the remainder.

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, 11 months ago
The page needs to be initialized to the items : var page=items; Then u need to skip(20), which means 2 pages gone, and Take(10), which makes the 3rd page...
upvoted 17 times
...
anne4
Most Recent 4 years, 6 months ago
In my exam the numbers were different so be careful!
upvoted 4 times
AyeshaKhalid
4 years, 5 months ago
what was your page numbers?
upvoted 2 times
noussa
4 years, 5 months ago
just keep in mind the formula and whatever the numbers will be, you'll be able to solve it: Skip((page - 1)*pageSize).Take(pageSize) example: Skip((3 - 1)*10).Take(10) number of pages : 3 pageSize refers to the items displayed by page: 10
upvoted 5 times
...
...
...
HgstExam
4 years, 9 months ago
var page = items.Skip(20).Take(10);
upvoted 3 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 ...