Can someone please help me to understand this.
Yes I understand value types on the stack and ref types on the heap. I understand Integer is a value type. I understand that when auto-boxed it is placed on the heap and when unboxed it is placed on the stack.
How does this work when calling a method of the Integer class?
e.g.
dim x as Integer = 10 'This is on the Stack
x.CompareTo(100) 'what happens here are value types allowed to have
'methods?
Yes I understand value types on the stack and ref types on the heap. I understand Integer is a value type. I understand that when auto-boxed it is placed on the heap and when unboxed it is placed on the stack.
How does this work when calling a method of the Integer class?
e.g.
dim x as Integer = 10 'This is on the Stack
x.CompareTo(100) 'what happens here are value types allowed to have
'methods?