I understand int's, as are all value types, are stored on the stack. Int's can be boxed into objects which then means the int is storage on the heap. BUT what happens when an int is stored in a List or int[]?
I know List ofT is a class/reference type/heap stored type - does this mean int's in a List are boxed onto the heap?
Thanks
No boxing is necessary when working with the generic List<int> type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With