user image

Preeti Tripathi

Job Interview Skills
English
2 years ago

Question 82. Why Can't Struct Be Used Instead Of Class For Storing Entity?

user image

Abhishek Mishra

2 years ago

Struct is of value type. If we pass it across methods in layers, a new object will be created in the stack thus increasing memory and processing requirement. So class should be used for creating entity like Employee, Supplier etc.

Recent Doubts

Close [x]