Answers to Chapter 18 Review Questions
|1:||List three kinds of data abstractions where structs should be considered instead of classes.|
|2:||Mention the important similarities and differences between classes and structs.|
|A2:||Similarities: structs and classes can both contain methods, properties, indexers, constructors, data members, operator methods, nested types; both can implement interfaces; and they both implicitly inherit from the System.Object class.
Differences: Structs cannot contain destructors; their constructors work in a slightly different way. Structs form value types, whereas classes ...