Saved Bookmarks
| 1. |
Why Can't Struct Be Used Instead Of Class For Storing Entity? |
|
Answer» 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. 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. |
|