Skip to content

Commit 04767a2

Browse files
authored
Clarify index parameters (#10830)
1 parent aa88d43 commit 04767a2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

xml/System/Array.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,9 +1471,9 @@
14711471
</Parameters>
14721472
<Docs>
14731473
<param name="sourceArray">The <see cref="T:System.Array" /> that contains the data to copy.</param>
1474-
<param name="sourceIndex">A 32-bit integer that represents the index in the <paramref name="sourceArray" /> at which copying begins.</param>
1474+
<param name="sourceIndex">A 32-bit integer that represents the index in <paramref name="sourceArray" /> at which copying begins.</param>
14751475
<param name="destinationArray">The <see cref="T:System.Array" /> that receives the data.</param>
1476-
<param name="destinationIndex">A 32-bit integer that represents the index in the <paramref name="destinationArray" /> at which storing begins.</param>
1476+
<param name="destinationIndex">A 32-bit integer that represents the index in <paramref name="destinationArray" /> at which storing begins.</param>
14771477
<param name="length">A 32-bit integer that represents the number of elements to copy.</param>
14781478
<summary>Copies a range of elements from an <see cref="T:System.Array" /> starting at the specified source index and pastes them to another <see cref="T:System.Array" /> starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.</summary>
14791479
<remarks>
@@ -1490,11 +1490,11 @@
14901490

14911491
This method is equivalent to the standard C/C++ function `memmove`, not `memcpy`.
14921492

1493-
The arrays can be reference-type arrays or value-type arrays. If `sourceArray` and `destinationArray` are both reference-type arrays or are both arrays of type <xref:System.Object>, a shallow copy is performed. A shallow copy of an <xref:System.Array> is a new <xref:System.Array> containing references to the same elements as the original <xref:System.Array>. The elements themselves or anything referenced by the elements are not copied. In contrast, a deep copy of an <xref:System.Array> copies the elements and everything directly or indirectly referenced by the elements.
1493+
The arrays can be reference-type or value-type arrays. If `sourceArray` and `destinationArray` are both reference-type arrays or are both arrays of type <xref:System.Object>, a shallow copy is performed. A shallow copy of an <xref:System.Array> is a new <xref:System.Array> containing references to the same elements as the original <xref:System.Array>. The elements themselves or anything referenced by the elements are not copied. In contrast, a deep copy of an <xref:System.Array> copies the elements and everything directly or indirectly referenced by the elements.
14941494

14951495
If this method throws an exception while copying, the `destinationArray` remains unchanged; therefore, <xref:System.Array.ConstrainedCopy%2A> can be used within a constrained execution region (<xref:System.Runtime.ConstrainedExecution.Cer>).
14961496

1497-
This method is an O(`n`) operation, where `n` is `length`.
1497+
This method is an $O(n)$ operation, where $n$ is `length`.
14981498

14991499
]]></format>
15001500
</remarks>
@@ -1945,9 +1945,9 @@
19451945
</Parameters>
19461946
<Docs>
19471947
<param name="sourceArray">The <see cref="T:System.Array" /> that contains the data to copy.</param>
1948-
<param name="sourceIndex">A 32-bit integer that represents the index in the <paramref name="sourceArray" /> at which copying begins.</param>
1948+
<param name="sourceIndex">A 32-bit integer that represents the index in <paramref name="sourceArray" /> at which copying begins.</param>
19491949
<param name="destinationArray">The <see cref="T:System.Array" /> that receives the data.</param>
1950-
<param name="destinationIndex">A 32-bit integer that represents the index in the <paramref name="destinationArray" /> at which storing begins.</param>
1950+
<param name="destinationIndex">A 32-bit integer that represents the index in <paramref name="destinationArray" /> at which storing begins.</param>
19511951
<param name="length">A 32-bit integer that represents the number of elements to copy.</param>
19521952
<summary>Copies a range of elements from an <see cref="T:System.Array" /> starting at the specified source index and pastes them to another <see cref="T:System.Array" /> starting at the specified destination index. The length and the indexes are specified as 32-bit integers.</summary>
19531953
<remarks>
@@ -2072,9 +2072,9 @@
20722072
</Parameters>
20732073
<Docs>
20742074
<param name="sourceArray">The <see cref="T:System.Array" /> that contains the data to copy.</param>
2075-
<param name="sourceIndex">A 64-bit integer that represents the index in the <paramref name="sourceArray" /> at which copying begins.</param>
2075+
<param name="sourceIndex">A 64-bit integer that represents the index in <paramref name="sourceArray" /> at which copying begins.</param>
20762076
<param name="destinationArray">The <see cref="T:System.Array" /> that receives the data.</param>
2077-
<param name="destinationIndex">A 64-bit integer that represents the index in the <paramref name="destinationArray" /> at which storing begins.</param>
2077+
<param name="destinationIndex">A 64-bit integer that represents the index in <paramref name="destinationArray" /> at which storing begins.</param>
20782078
<param name="length">A 64-bit integer that represents the number of elements to copy. The integer must be between zero and <see cref="F:System.Int32.MaxValue">Int32.MaxValue</see>, inclusive.</param>
20792079
<summary>Copies a range of elements from an <see cref="T:System.Array" /> starting at the specified source index and pastes them to another <see cref="T:System.Array" /> starting at the specified destination index. The length and the indexes are specified as 64-bit integers.</summary>
20802080
<remarks>
@@ -2232,7 +2232,7 @@
22322232
</Parameters>
22332233
<Docs>
22342234
<param name="array">The one-dimensional array that is the destination of the elements copied from the current array.</param>
2235-
<param name="index">A 32-bit integer that represents the index in <paramref name="array" /> at which copying begins.</param>
2235+
<param name="index">A 32-bit integer that represents the index in the destination array at which copying begins.</param>
22362236
<summary>Copies all the elements of the current one-dimensional array to the specified one-dimensional array starting at the specified destination array index. The index is specified as a 32-bit integer.</summary>
22372237
<remarks>
22382238
<format type="text/markdown"><![CDATA[
@@ -2316,7 +2316,7 @@
23162316
</Parameters>
23172317
<Docs>
23182318
<param name="array">The one-dimensional array that is the destination of the elements copied from the current array.</param>
2319-
<param name="index">A 64-bit integer that represents the index in <paramref name="array" /> at which copying begins.</param>
2319+
<param name="index">A 64-bit integer that represents the index in the destination array at which copying begins.</param>
23202320
<summary>Copies all the elements of the current one-dimensional array to the specified one-dimensional array starting at the specified destination array index. The index is specified as a 64-bit integer.</summary>
23212321
<remarks>
23222322
<format type="text/markdown"><![CDATA[
@@ -3395,11 +3395,11 @@
33953395
</Parameters>
33963396
<Docs>
33973397
<typeparam name="T">The type of the elements of the array.</typeparam>
3398-
<param name="array">The <see cref="T:System.Array" /> to be filled.</param>
3398+
<param name="array">The array to be filled.</param>
33993399
<param name="value">The new value for the elements in the specified range.</param>
3400-
<param name="startIndex">A 32-bit integer that represents the index in the <see cref="T:System.Array" /> at which filling begins.</param>
3400+
<param name="startIndex">A 32-bit integer that represents the index in <paramref name="array" /> at which filling begins.</param>
34013401
<param name="count">The number of elements to copy.</param>
3402-
<summary>Assigns the given <paramref name="value" /> of type <typeparamref name="T" /> to the elements of the specified <paramref name="array" /> which are
3402+
<summary>Assigns the given <paramref name="value" /> of type <typeparamref name="T" /> to the elements of the specified <paramref name="array" /> that are
34033403
within the range of <paramref name="startIndex" /> (inclusive) and the next <paramref name="count" /> number of indices.</summary>
34043404
<remarks>To be added.</remarks>
34053405
</Docs>

0 commit comments

Comments
 (0)