Which of the following statements is correct about constructors in C#.NET?

Thảo Justin

New member
Which of the following statements is correct about constructors in C#.NET?
A. A constructor cannot be declared as private
B. A constructor cannot be overloaded
C. A constructor can be a static constructor
D. None of the mentioned
 
Answer: c
Explanation: Static constructor is a constructor which can be called before any object of class is created or any static method is invoked. A static constructor is implicitly called by .net CLR.
 

Tìm kiếm

Back
Top