Interviews3 answers
3 Answers
A struct is a value type, whereas a class is a reference type.
A struct does not support inheritance (other than implicitly deriving from object).
A struct can have all the members a class can, except the following:
A parameterless constructor
A finalizer
Virtual members
Munesh SharmaPosted Jul 23, 2014, 1:57 AM EDT
because its fully object oriented
dhansukh velaniPosted Jul 22, 2014, 11:28 PM EDT
c# structures send object by value like basic type which reduce overhead.
structure can not inheritance,static, abstract virtual methods or members .
structure can have constructor but no argument constructor can't be overloaded.
structure can use interfaces, operator overloading ,indexer and property.
structure should be used for small object that did not inheritance
Simi TkdPosted Jul 10, 2014, 5:25 AM EDT

