Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you mean "where in memory does the data get stored - on the stack or on the heap" it gets quite complicated, and partly depends on the language.</p> <p>I've written <a href="http://pobox.com/~skeet/csharp/memory.html" rel="nofollow noreferrer">an article about it</a> which goes into more detail than I care to repeat here. Simplistic explanations such as the oft-repeated "value types live on the stack, reference types live on the heap" is hugely flawed, with the obvious counterexample of an <code>int</code> variable in a reference type - the value of that variable will always be stored on the heap, even though <code>int</code> is a value type.</p> <p>However, you'd also be wise to read Eric Lippert's <a href="http://blogs.msdn.com/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx" rel="nofollow noreferrer">blog post about the matter</a> - it's an implementation issue, and developers tend to get far too worried about it. The C# team <em>could</em> decide to change it all in a later version, and create a new object containing <em>all</em> local variables (instead of just captured ones).</p> <p>Admittedly it's an <em>important</em> implementation detail - how much you put on the stack affects how deep your stack can be, etc - but we probably should spend so much time obsessing about it.</p> <p>If this <em>isn't</em> what you intended the question to be about, please clarify it. For instance, you could mean:</p> <ul> <li>Where does type meta-data exist at execution-time?</li> <li>Where are the BCL types stored on disk?</li> <li>Where does the JIT-compiled code for types exist, and is it stored?</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload