Which code segment should you use?
A Windows Communication Foundation (WCF) service implements the following contract.

The implementation is as follows:

The service is self-hosted, and the hosting code is as follows:

You need to implement CreateHost so that the service has a single endpoint hosted at http://localhost:8000/HelloService. Which code segment should you use?
A.

B.

C.

D.
Correct Answer: D
Explanation/Reference:
Eliminate A and C, because there is no overload for WebServiceHost constructor that takes only one argument. Choose D over B because of the need of a single endpoint. D provides a singleton instance.
Overload List for WebServiceHost Constructor