From 33891a0d2f374037d70508946a1179922ef1ac18 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Mon, 14 Mar 2016 16:53:42 +0100 Subject: [PATCH] Update out of date comment in List Comment for parameterless constructor of List claimed that the default non-zero capacity was 16, even though _defaultCapacity is actually 4. Updated the comment to refer to _defaultCapacity, to make sure it doesn't need to be updated again if _defaultCapacity changes in the future. --- src/mscorlib/src/System/Collections/Generic/List.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mscorlib/src/System/Collections/Generic/List.cs b/src/mscorlib/src/System/Collections/Generic/List.cs index ff5fe5b..f557003 100644 --- a/src/mscorlib/src/System/Collections/Generic/List.cs +++ b/src/mscorlib/src/System/Collections/Generic/List.cs @@ -46,7 +46,8 @@ namespace System.Collections.Generic { // Constructs a List. The list is initially empty and has a capacity // of zero. Upon adding the first element to the list the capacity is - // increased to 16, and then increased in multiples of two as required. + // increased to _defaultCapacity, and then increased in multiples of two + // as required. public List() { _items = _emptyArray; } -- 2.7.4