Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.1k views
in Technique[技术] by (71.8m points)

C# Are my assumptions concerning where an instance of a Value type(specifically a struct type) stored in memory correct?

According to what I have read so far from the sources on the web is the following statement correct?

  • In C#, an instance of a Value type(specifically an instance of a struct type) is either stored in the Stack or Heap depending on if its assigned to a variable stored in the Stack or Heap. Thus, always stored in the same memory location(Stack or Heap) as the variable that it is assigned to.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...