exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 3 question 17 discussion

Actual exam question from Microsoft's MB-500
Question #: 17
Topic #: 3
[All MB-500 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You must extend the class SalesLineType and add a new method that returns the day of week for the system's current date as an integer value.
You need to create a class that extends SalesLineType and adds the new method.
Solution: You create the following code:

Does the solution meet the goal?

  • A. Yes
  • B. No
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
NSIDEV
Highly Voted 2 years, 8 months ago
Example incorrect because the suffix is _myExtension instead of _Extension
upvoted 5 times
Derian
2 years, 3 months ago
and there is not a "next" keyword in the Method extension.
upvoted 1 times
juversg
1 year, 7 months ago
According to the task the method extensionMethodDayOfWeek() is a new method, not an extension method. So there is no need for the "next" keyword.
upvoted 6 times
...
...
...
8933e4c
Most Recent 8 months, 3 weeks ago
I would prefer A. The required method is new, so no next is allowed because we have no CoC here. To use _Extension is a reasonable recommendation but not requiered.
upvoted 4 times
...
shyammo
9 months, 3 weeks ago
1. you would need to create a new class that extends SalesLineType and add the method directly to this new class, rather than using CoC. 2.CoC cannot be used to add new methods to a class.
upvoted 1 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 ...