Remove ternary operator from invocation as it is the same as inputing items.Count
authorAndrew Hoefling <andrew@hoeflingsoftware.com>
Tue, 5 Mar 2019 04:44:19 +0000 (23:44 -0500)
committerSantiago Fernandez Madero <safern@microsoft.com>
Fri, 8 Mar 2019 19:20:58 +0000 (11:20 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/c32f57bdae5cd532ebb3587386db937528726ca6

src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/Collection.cs

index 69d50fb..67185eb 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Collections.ObjectModel
             InsertItem(index, item);
         }
 
-        public void AddRange(IEnumerable<T> collection) => InsertItemsRange(items.Count > 0 ? items.Count : 0, collection);
+        public void AddRange(IEnumerable<T> collection) => InsertItemsRange(items.Count, collection);
 
         public void Clear()
         {