Looking for clarification on this…
I’ve heard that ‘everything’ in .Net inherits from Object. I’ve also heard that the difference between value types and reference types is that reference types inherit from Object and value types do not.
My understanding was that everything was an object (inherits from System.Object); but value types and reference types were simply ‘different’ from one another. Value types are allocated on the stack and reference types get a ‘pointer’ placed on the Stack that points to an address on the Heap.
Is that the gist of it? What makes an Integer a value type? That’s something inherent in the language?
Value types, such as
Int32, are structs.From the VS 2008 C# help file (since I had it open) on structs: