C# C# Collections Lists Lists

Carel Du Plessis
Carel Du Plessis
Pro Student 16,356 Points

I don't see the 3 times it resizes the List

Can someone point out where the list resizes the third time (in the question below)

Question: How many times will the list need to resize while the following code runs?

List favoriteThings = new List();

favoriteThings.Add("sunshine"); favoriteThings.Add("ice cream"); favoriteThings.Add("babies laughing"); favoriteThings.Add("chocolate chip cookies"); favoriteThings.Add("Star Trek"); favoriteThings.Add("bean bag chairs"); favoriteThings.Add("apples"); favoriteThings.Add("snow"); favoriteThings.Add("mountain streams"); favoriteThings.Add("trees");

Answer: 3 times