Hi,
I always been under the impression that value types are stored on the stack while reference types are stored on the heap. Then the other day I read somewhere that said something in the line of "value types are stored on the stack unless they are part of a class in which case they are stored on the heap". What does that mean? I though everything is a class in .Net, even Modules are really compiled into some sort of static classes.
So my question is simply this: When would a value type be stored on the heap?
I always been under the impression that value types are stored on the stack while reference types are stored on the heap. Then the other day I read somewhere that said something in the line of "value types are stored on the stack unless they are part of a class in which case they are stored on the heap". What does that mean? I though everything is a class in .Net, even Modules are really compiled into some sort of static classes.
So my question is simply this: When would a value type be stored on the heap?