How should you complete the relevant code?

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 orscroll to view content.)

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 orscroll to view content.)

Answer:

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


MarcoJacob

MarcoJacob

Code Segments 1 and 3

Candis

Candis

Can you please explain why should this be the answer. Why not 2 and 4.

Herman McConnell

Herman McConnell

Well, is should be 1 because class constructe in predefined code on right side is static, so you can’t have static constructor in non-static class.

And, it should be 3 because “this T name” declare this like extension method of base String type (see more on msdn)