What are the differences between Structure and Class?

Structure
1: It is value type 
2: It is stored on stack 
3: It does not support inheritance
4: It is suitable for small data structure

Class
1: It is reference type
2: It is stored on heap
3: It supports inheritance
4: It is suitable for complex data structures

Comments

Popular posts from this blog

Explain what is the difference between View and Partial View?

Difference Between Singleton and Static class?

Explain what is routing in MVC? What are the three segments for routing important?