what is the difference between class and


What is the difference between Class and structure's?

The main differences between them are as follows:-

1) The Structure is value types while classes are reference types. Hence structures use stack and classes use heap.

2) The Structures members can not be declared as protected, while the class members can be. You can not do inheritance in the structures.

3) The Structures do not require constructors but classes require.

4) The Objects created from classes are terminated using Garbage collector. While Structures are not destroyed using GC.

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: what is the difference between class and
Reference No:- TGS0161270

Expected delivery within 24 Hours