Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道存储在堆栈中的值类型实例和存储在堆中的引用类型实例。但是,CLR确保所有定义Type的程序集都加载完毕后,它会创建一些数据结构来存储类型对象,引用类型对象将存储在堆中,值类型对象存储在哪里?
不同类型的Type对象都是引用类型,即Type是一个类,所以都存放在堆上。
Type
请注意,只有当值类型是方法中的局部变量时,它们才会存储在堆栈中。如果它们是类的成员,它们将作为该类实例的一部分存储在堆上。
作为引用类型对象成员的值类型对象将存储在堆中。
该主题将帮助您了解更多。
I have spent all day on the Web and on this site looking for an answer to my problem, and hope you guys can help. First of all, I am trying to display the contents of an ArrayLis
ArrayLis