The CLR supports two kinds of types: reference types and value types. Of the two, you’ll run into reference types much more often. Reference types are always allocated from the managed heap, and the C#
new operator returns the memory address of the object—the memory address refers to the object’s bits. You need to bear in mind some performance considerations when you’re working with reference types. First consider these facts:
The memory must be allocated from the managed heap.
Each object allocated on the heap has some additional overhead members associated with it that must be initialized.
Allocating an object from the managed heap could force a garbage collection to occur.
If every type were a reference type, an ...