Update out of date comment in List<T>
authorPetr Onderka <gsvick@gmail.com>
Mon, 14 Mar 2016 15:53:42 +0000 (16:53 +0100)
committerPetr Onderka <gsvick@gmail.com>
Thu, 17 Mar 2016 21:37:30 +0000 (22:37 +0100)
Comment for parameterless constructor of List<T> 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

index ff5fe5b..f557003 100644 (file)
@@ -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;
         }