本文介绍了如果在类中声明了结构,请解释结构的存储位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如果在类中声明了
,请你解释一下堆存储在哪里,因为类是引用类型,所以它得到

存储在堆上,但struct是一个值类型 - 存储在堆栈上


问候


thomson

Hi all,
Would you please explain me where will be the heap stored if it
is declared inside the Class, As class is a reference type, so it gets
stored on the heap, but struct is a value type-stored on the stack

Regards

thomson

推荐答案










它没有比Jon的文章更详细:



这篇关于如果在类中声明了结构,请解释结构的存储位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 15:17
查看更多