MSDN says that you should use structs when you need lightweight objects. Are there any other scenarios when a struct is preferable over a class?
Some people might have forgotten that:
- structs can have methods.
- structs cannot be inherited.
I understand the technical differences between structs and classes, I just don't have a good feel for when to use a struct.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…