Structure
- implicity inherits from System.ValueType (always reside on stack)
- are sealed and can not be inherited, and also cannot inherit classes and other structures
- The default constructor of a structure cannot be replaced by a custom constructor.
- Custom constructors of a structure must fully initialize the value of the structure.
- Dont have a destructor
- Field initialization is not allowed. Const members of a structure can be initialized.
You should probably be a little more explicit on your third point. A struct is a value-type with value-type semantics - this is hugely important and should probably be your first point.
ReplyDelete@Bog Saggett: Now, I edited my post. I placed third point to first position, and also combine previous first and second point into one single second point.
ReplyDelete