C# Programming - Structures - Discussion

Discussion Forum : Structures - General Questions (Q.No. 14)
Which of the following statements is correct?
A struct never declares a default constructor.
All value types in C# inherently derive from ValueType, which inherits from Object.
A struct never declares a default destructor.
In C#, classes and structs are semantically same.
Answer: Option
No answer description is available. Let's discuss.
6 comments Page 1 of 1.

Sweety said:   1 decade ago
Structure cannot have default constructor.

Ragini said:   1 decade ago
It will give an error if we declare a default constructor in struct.

Sagar said:   9 years ago
1st answer is correct. Structure cannot contain default or parameter less constructors.

Vaibhav said:   6 years ago
Option B is also correct.

Rudra said:   6 years ago
According to me, Option A is correct.

Chandan singh said:   5 years ago
I think A is the correct answer.

Post your comments here:

Your comments will be displayed after verification.