exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 4 question 36 discussion

Actual exam question from Microsoft's MB-500
Question #: 36
Topic #: 4
[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. Determine whether the solution meets 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 create a new attribute class in which to mark other classes in the ISV solution and their respective methods with the error levels Warning and Error.

You have the following class: (Line numbers are included for reference only.)



You need to ensure that the compiler will report an error if code calls the bike method.

Solution:

Create the following attribute class:



Insert the following code at line 01:

[ISVObsoleteAttribute(ErrorWarning::Warning, "This class will be deprecated in future releases, please use the Transportation class instead.")]

Insert the following code at line 04:

[ISVObsoleteAttribute(ErrorWarning::Error, "Deprecated. Please use the bicycle class instead.")]

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
smithlaod
1 year, 3 months ago
Selected Answer: B
B. Cauz the ErrorWarning Enum shows that this call will cause a warning but an error is required in this question.
upvoted 2 times
8933e4c
8 months, 2 weeks ago
I tend to B, since the question requires to throw an error if the bike-method is called. The other methods may be used, as I understand the scenario.
upvoted 1 times
...
...
kself
1 year, 4 months ago
Feels like this one could go either way. Technically, the only requirement is that the compiler throw an error if someone attempts to call 'bike'. The first part of the "solution" doesn't impact the requirement either way, but the second part is correct. So the solution does technically meet the requirement...it just contains extra code
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 ...