exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 127 discussion

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

You write the following method (line numbers are included for reference only):

You need to ensure that the method extracts a list of URLs that match the following pattern:
@http://(www\.)?([^\.]+)\.com;
Which code should you insert at line 07?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
The MatchCollection.GetEnumerator method returns an enumerator that iterates through a collection.
Note:
The MatchCollection Class represents the set of successful matches found by iteratively applying a regular expression pattern to the input string.
Reference: MatchCollection.GetEnumerator Method
https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.matchcollection.getenumerator(v=vs.110).aspx

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
Mitsoshima
Highly Voted 6 years ago
Correct answer is: C
upvoted 39 times
...
dakuan
Highly Voted 5 years, 7 months ago
C is correct.
upvoted 14 times
...
noussa
Most Recent 4 years, 5 months ago
Correct answer is C
upvoted 2 times
...
SailajaT
4 years, 6 months ago
Option A returns exception. OPtion C is correct.
upvoted 2 times
...
DiegoB
4 years, 10 months ago
C, tested
upvoted 6 times
...
TonyBezerra
5 years, 3 months ago
I think the right answer is option C
upvoted 6 times
...
sscooter1010
5 years, 4 months ago
C is correct
upvoted 8 times
...
sscooter1010
5 years, 4 months ago
Option A throws this exception: System.InvalidCastException: Unable to cast object of type 'System.Text.RegularExpressions.MatchEnumerator' to type 'System.Collections.Generic.List`1[System.String]'.
upvoted 2 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 ...