Microsoft Exam Questions

You need to ensure that new instances of Connection can be created only by other classes by calling

You have the following code (line numbers are included for reference only):

You need to ensure that new instances of Connection can be created only by other classes by calling
the Create method. The solution must allow classes to inherit from Connection.
What should you do?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
The following list provides the main features of a static class:
* Contains only static members.
* Cannot be instantiated.
* Is sealed.
* Cannot contain Instance Constructors.
Creating a static class is therefore basically the same as creating a class that contains only static
members and a private constructor. A private constructor prevents the class from being instantiated.

Static Classes and Static Class Members (C# Programming Guide)
https://msdn.microsoft.com/en-us/library/79b3xss3.aspx