In .net, the value types are stored on stack where as reference types are stored on managed heap. What is the reason for this one? Is it not possible to exchange their storage locations?
Tell me more
×
Programmers Stack Exchange is a question and answer site for
professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
|
|
The stack is an implementation detail. The important thing is the reference/value distinction.
It's very easy to store value types on the heap.
|
|||||||||
|
|
These brilliant articles by Eric Lippert should tell you what you need to know. To sum up: don't worry about it. |
|||
|
|
