Skip to content

Commit 4ec53ef

Browse files
authored
Clarify Enumerable.Prepend returns a new sequence
Changed the summary from "Adds a value to the beginning of the sequence" to "Returns a new sequence that begins with the specified element followed by the elements of the source sequence." The previous wording incorrectly implied in-place modification of the original sequence. The new wording makes it clear that Prepend returns a new sequence without modifying the source, consistent with LINQ's deferred execution and immutability principles.
1 parent c9db664 commit 4ec53ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Linq/Enumerable.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11681,7 +11681,7 @@ If comparer is `null`, the default comparer <see cref="P:System.Collections.Gene
1168111681
<typeparam name="TSource">The type of the elements of <paramref name="source" />.</typeparam>
1168211682
<param name="source">A sequence of values.</param>
1168311683
<param name="element">The value to prepend to <paramref name="source" />.</param>
11684-
<summary>Adds a value to the beginning of the sequence.</summary>
11684+
<summary>Returns a new sequence that begins with the specified element followed by the elements of the source sequence.</summary>
1168511685
<returns>A new sequence that begins with <paramref name="element" />.</returns>
1168611686
<remarks>
1168711687
<format type="text/markdown"><![CDATA[

0 commit comments

Comments
 (0)