exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 30 discussion

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

An application is throwing unhandled NullReferenceException and FormatException errors. The stack trace shows that the exceptions occur in the
GetWebResult()
The application includes the following code to parse XML data retrieved from a web service. (Line numbers are included for reference only.)

You need to handle the exceptions without interfering with the existing error-handling infrastructure.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️
A: The TryParse method is like the Parse method, except the TryParse method does not throw an exception if the conversion fails. It eliminates the need to use exception handling to test for a FormatException in the event that s is invalid and cannot be successfully parsed.
C: UnhandledException event handler
If the UnhandledException event is handled in the default application domain, it is raised there for any unhandled exception in any thread, no matter what application domain the thread started in. If the thread started in an application domain that has an event handler for UnhandledException, the event is raised in that application domain.

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
jose1024
Highly Voted 5 years, 4 months ago
A is needed to prevent FormatException. C is needed to catch NullReferenceException in case resolve element does not exist
upvoted 7 times
...
JoelChuca
Most Recent 4 years, 8 months ago
Why option C is necessary? I think it is enough with option A
upvoted 3 times
Hikacz
4 years, 4 months ago
"(Each correct answer presents part of the solution. Choose two.)"
upvoted 2 times
AyeshaKhalid
4 years, 4 months ago
I have an appointment for this exam on the day after tomorrow I'm preparing from this website exam topics. So, how much probability of the questions to come from examtopics
upvoted 1 times
lh2607
4 years, 3 months ago
How did you get on? Many questions from here come up?
upvoted 3 times
...
...
...
TomasRafaj
4 years, 3 months ago
If the result parameter or the Element is null, throws an exception anyway, so I think that's why...
upvoted 1 times
...
...
supersunny
5 years, 9 months ago
AC. Right
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