Question discussion

Which of the following is FALSE with reference to constructor in C#.NET?

3342Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which of the following is FALSE with reference to constructor in C#.NET?

  • AIt can have a return type.
  • BAll classes have constructors by default.
  • CConstructor name must match the class name.
  • DThe constructor is called when the object is created.
Correct answer: A

Explanation

In C#, a constructor cannot have a return type. So statement 1 is false.

Discussion 0

Nobody has replied yet. Start the discussion!