diff --git a/src/System.Linq/src/System/Linq/Repeat.cs b/src/System.Linq/src/System/Linq/Repeat.cs index 9699da2a713c..9581876997cc 100644 --- a/src/System.Linq/src/System/Linq/Repeat.cs +++ b/src/System.Linq/src/System/Linq/Repeat.cs @@ -79,10 +79,7 @@ public TResult[] ToArray() TResult[] array = new TResult[_count]; if (_current != null) { - for (int i = 0; i != array.Length; ++i) - { - array[i] = _current; - } + Array.Fill(array, _current); } return array;