List optimizes erratically <p>If I execute the below code and do not press any key on the console</p> <pre><code>class Program { static void Main(string[] args) { List&lt;Test&gt; list = new List&lt;Test&gt;(1) {new Test()}; Console.ReadKey(); GC.KeepAlive(list); var x = list[0]; Console.WriteLine((x.ToString())); } } class Test { public override string ToString() { return "Empty object"; } } </code></pre> <p>Then upon analyzing the array in windbg I see the list do not contain the test object I added. <img src="https://i.stack.imgur.com/aXKQa.png" alt="enter image description here"></p> <p>The element in the 0'th position is something else which i am not sure of</p> <p><img src="https://i.stack.imgur.com/mbuJz.png" alt="enter image description here"></p> <p>However if i add a string property to my Test class like so</p> <pre><code>class Test { public string Name = "Rohit"; public override string ToString() { return "Empty object"; } } </code></pre> <p>Then this time windbg reveals the object</p> <p><img src="https://i.stack.imgur.com/thPxF.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/l81lu.png" alt="enter image description here"></p> <p>Can someone please help explain what is going on? I test the above using Visual Studio 2015 (.net 4 compatability mode) on x64 windows 7</p> <p>Aside: Even though i requested for the list size to be one (for my test), i see it is going with the default size of 128. So basically the initial capacity is based on some heuristics etc?</p>