0
Is struct value type or reference type?
I read in document struct is a value type.But i also can use struct class with new keyword and without new operator. I reall dont understand it is value type or reference type. Thanks for help
2 Antworten
+ 2
Anything with new is reference type because it lives on heap not the stack (Google stack vs heap and new keyword)... Variable with struct type is value unless new is used or regular pointer of type struct is used
+ 1
Ok i will Google and look it more