Constructors and the Object Lifecycle
Developers new to C# who have had experience in other object-oriented languages such as Java should not be surprised with the level of support for creating objects on the managed heap. Java developers have wallowed in the ideal that memory management is a function of the JVM and construction and destruction are managed processes that should be abstracted from the developer. The equivalent C++ developers, on the other hand, would have to manage memory themselves, which more often than not caused problems.
KeywordsDesign Pattern Base Class Conversion Operator Static Constructor Public Class
Unable to display preview. Download preview PDF.