exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 84 discussion

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

You are implementing a method named GetValidPhoneNumbers. The GetValidPhoneNumbers() method processes a list of string values that represent phone numbers.
The GetValidPhoneNumbers() method must return only phone numbers that are in a valid format.
You need to implement the GetValidPhoneNumbers() method.
Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️
✑ Regex.Matches
Searches an input string for all occurrences of a regular expression and returns all the matches.
✑ MatchCollection
Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string.
The collection is immutable (read-only) and has no public constructor. The Regex.Matches method returns a MatchCollection object.
✑ List<T>.Add Method
Adds an object to the end of the List<T>.

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
AB are correct. They have tested.
upvoted 12 times
...
hseagraves
Most Recent 4 years, 5 months ago
Just tried this. Question appears to be wrong or I'm wrong. Says that it process a LIST of string values but the input is a string. Still, A and B appear to be correct.
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 ...