Skip to content

Commit de90476

Browse files
Gnbrkm41BillWagner
authored andcommitted
Correct parameter names for (ReadOnly)Span.Slice(Int32, Int32) methods (#2468)
* Fix non-existent parameter `index` to `start` * Fix non-existent, incorrect param names
1 parent ff4a282 commit de90476

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

xml/System/ReadOnlySpan`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ A `ReadOnlySpan<T>` instance is often used to reference the elements of an array
712712
<Docs>
713713
<param name="start">The index at which to begin the slice.</param>
714714
<summary>Forms a slice out of the current read-only span that begins at a specified index.</summary>
715-
<returns>A span that consists of all elements of the current span from <paramref name="index" /> to the end of the span.</returns>
715+
<returns>A span that consists of all elements of the current span from <paramref name="start" /> to the end of the span.</returns>
716716
<remarks>To be added.</remarks>
717717
<exception cref="T:System.ArgumentOutOfRangeException">
718718
<paramref name="start" /> is greater than the number of items in the read-only span.</exception>
@@ -780,7 +780,7 @@ A `ReadOnlySpan<T>` instance is often used to reference the elements of an array
780780
<param name="start">The index at which to begin this slice.</param>
781781
<param name="length">The desired length for the slice.</param>
782782
<summary>Forms a slice out of the current read-only span starting at a specified index for a specified length.</summary>
783-
<returns>A read-only span that consists of <paramref name="length" /> elements from the current span starting at <paramref name="index" />.</returns>
783+
<returns>A read-only span that consists of <paramref name="length" /> elements from the current span starting at <paramref name="start" />.</returns>
784784
<remarks>To be added.</remarks>
785785
<exception cref="T:System.ArgumentOutOfRangeException">
786786
<paramref name="start" /> is less than zero or greater than <see cref="T:System.Span`1.Length" />.</exception>
@@ -888,4 +888,4 @@ If the `destination` length is shorter than `source`, no items are copied and th
888888
</Docs>
889889
</Member>
890890
</Members>
891-
</Type>
891+
</Type>

xml/System/Span`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ Two <xref:System.Span%601> objects are equal if they have different lengths or i
919919
<Docs>
920920
<param name="start">The index at which to begin the slice.</param>
921921
<summary>Forms a slice out of the current span that begins at a specified index.</summary>
922-
<returns>A span that consists of all elements of the current span from <paramref name="index" /> to the end of the span.</returns>
922+
<returns>A span that consists of all elements of the current span from <paramref name="start" /> to the end of the span.</returns>
923923
<remarks>To be added.</remarks>
924924
<exception cref="T:System.ArgumentOutOfRangeException">
925925
<paramref name="start" /> is less than zero or greater than <see cref="T:System.Span`1.Length" />.</exception>
@@ -987,10 +987,10 @@ Two <xref:System.Span%601> objects are equal if they have different lengths or i
987987
<param name="start">The index at which to begin this slice.</param>
988988
<param name="length">The desired length for the slice.</param>
989989
<summary>Forms a slice out of the current span starting at a specified index for a specified length.</summary>
990-
<returns>A span that consists of <paramref name="length" /> elements from the current span starting at <paramref name="index" />.</returns>
990+
<returns>A span that consists of <paramref name="length" /> elements from the current span starting at <paramref name="start" />.</returns>
991991
<remarks>To be added.</remarks>
992992
<exception cref="T:System.ArgumentOutOfRangeException">
993-
<paramref name="start" /> or <paramref name="start" /> + <paramref name="index" /> is less than zero or greater than <see cref="T:System.Span`1.Length" />.</exception>
993+
<paramref name="start" /> or <paramref name="start" /> + <paramref name="length" /> is less than zero or greater than <see cref="T:System.Span`1.Length" />.</exception>
994994
</Docs>
995995
</Member>
996996
<Member MemberName="ToArray">
@@ -1106,4 +1106,4 @@ If `destination` is shorter than the source <xref:System.Span%601>, this method
11061106
</Docs>
11071107
</Member>
11081108
</Members>
1109-
</Type>
1109+
</Type>

0 commit comments

Comments
 (0)