exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 3 question 24 discussion

Actual exam question from Microsoft's MB-500
Question #: 24
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 have an enumeration named truckStatus that has the following statuses:
✑ Empty
✑ Loaded
✑ Completed
You have the following code:

You need to extend this enumeration and add the following statuses to the enumeration: Quarantine, InTransit. You must then modify code that validates the switch statement.
Solution: Add a post handler to the method that checks the enumeration and logic for your new enumeration values using a range comparison for your new values.

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
viking1
Highly Voted 1 year, 4 months ago
B - No is correct because enums should not be treated as numerical values, as the actual numerical values used to represent each value in an enum are unpredictable, especially in the case of an extensible enum.
upvoted 11 times
...
Prollyx
Most Recent 7 months, 2 weeks ago
Selected Answer: B
You can safely use "<>" numerical operators only on the base enum values (and it is actully used in the standard code pretty often). For the values not from base enum you have no assurance that there is only only extension of this enum, which could mess with the extension value order.
upvoted 2 times
...
pjgallego
9 months, 3 weeks ago
Selected Answer: B
Correct B
upvoted 1 times
...
puzoniasty
10 months, 3 weeks ago
Selected Answer: B
Correct, please refer to https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/add-enum-value
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago