Interview Questions

What is the difference between a Struct and a Class?

C# Interview Questions and Answers


(Continued from previous question...)

175. What is the difference between a Struct and a Class?

Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is that structs cannot inherit.

(Continued on next question...)

Other Interview Questions