Question

In .NET (C#), what is the difference between 'struct' and 'class'?

A struct supports inheritance; class does not
B struct is a reference type stored on the heap; class is a value type stored on the stack
C struct is a value type stored on the stack; class is a reference type stored on the heap
D struct cannot have methods; class can have methods
E There is no practical difference in modern .NET
Practice Next

Relevant for Exams:

Hey! Ask a query