exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 12 discussion

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

DRAG DROP -
You are developing a class named ExtensionMethods.
You need to ensure that the ExtensionMethods class implements the IsEmail() method on string objects.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

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
tanujgyan
Highly Voted 5 years, 1 month ago
The answer in solution is correct
upvoted 5 times
...
devpride
Most Recent 4 years, 6 months ago
correction: remove phrase "be good if such mistakes sometimes"...my mistake!
upvoted 1 times
...
devpride
4 years, 6 months ago
Question talks about IsEmail() whereas the screenshot showing in question shows IsUrl()? I know its simple thing, but it would be good if such mistakes sometimes leads confusion and takes time to re-think again thinking that did we really miss anything here and go back to read the same question again and again? weird right?
upvoted 1 times
...
zzMichielzz
4 years, 7 months ago
public static class this String str
upvoted 2 times
...
lh2607
4 years, 10 months ago
public static class ExtensionMethods this String str
upvoted 1 times
...
XardasLord
4 years, 11 months ago
In question there is 'IsEmail() method
upvoted 3 times
...
robinnirola
5 years ago
public static ExtensionClass this string str
upvoted 1 times
...
robinnirola
5 years ago
public static Extension this string str
upvoted 3 times
...
whyjtrees
5 years, 3 months ago
Because it is extension method, you need this keyword
upvoted 2 times
...
FutureMfana
5 years, 3 months ago
Why would include this keyword on declarations? I thought the answer would be String str. I stand to be correct gurus
upvoted 2 times
tanujgyan
5 years, 1 month ago
Thats the way "extension methods" work. The syntax asks you to use this
upvoted 3 times
jan_oratowski
4 years, 5 months ago
This extension method would be used in something like that: string maybeUrl = "abcd"; bool isItString = maybeUrl.IsUrl(); In order to tell the compiler that you want to use the method on a string object without passing the string object between (), you have to add "this". You do that, because there may be more than just one parameter and then compiler will not know which parameter should be used. Otherwise it would be: bool isItString = IsUrl(maybeUrl);
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago