Google News
logo
C# - Quiz(MCQ)
Which of the following statements is correct about constructors?
A)
Static constructors can use optional arguments.
B)
Overloaded constructors cannot use optional arguments.
C)
If we do not provide a constructor, then the compiler provides a zero-argument constructor.
D)
If we provide a one-argument constructor then the compiler still provides a zero-argument constructor.

Correct Answer :   If we do not provide a constructor, then the compiler provides a zero-argument constructor.

Advertisement