Value types in object stored in heap as well?
问题 I can imagine this question has been asked thousands of times, but I didn't have much luck in finding the answer, plus this is more out of curiosity than need. Digging into the nuts and bolts of C#, I was wondering since objects are stored in the heap, are the value types within the objects stored in the heap as well or are they placed in the stack? 回答1: They are stored in the heap, inside of the memory allocated for the reference type. In addition, value types are often stored in places