What's the difference between an object and a struct in OOP?

后端 未结 10 1765
旧时难觅i
旧时难觅i 2021-01-30 09:05
  • What distinguishes and object from a struct?
  • When and why do we use an object as opposed to a struct?
  • How does an array differ from both, and when and wh
10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 09:34

    Short answer: Structs are value types. Classes(Objects) are reference types.

提交回复
热议问题