Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 86f46a6

Browse files
gfoidlmairaw
authored andcommitted
Span<T>(Void*, Int32) length is number of T elements, not bytes (dotnet#2272)
* Span<T>(Void*, Int32) length is number of T elements, not bytes * PR Feedback Cf. dotnet#2272 (comment) * Updated doc for ROSpan Cf. dotnet#2272 (comment) * Added space before />
1 parent 6392a35 commit 86f46a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

xml/System/ReadOnlySpan`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ A `ReadOnlySpan<T>` instance is often used to reference the elements of an array
102102
<Parameter Name="length" Type="System.Int32" />
103103
</Parameters>
104104
<Docs>
105-
<param name="pointer">A pointer to the starting address of a specified number of <paramref name="T" /> objects in memory.</param>
106-
<param name="length">The number of <paramref name="T" /> objects to be included.</param>
107-
<summary>Creates a new <see cref="T:System.ReadOnlySpan`1" /> from a specified number of bytes starting at a specified memory address.</summary>
105+
<param name="pointer">A pointer to the starting address of a specified number of <typeparamref name="T" /> elements in memory.</param>
106+
<param name="length">The number of <typeparamref name="T" /> elements to be included in the <see cref="T:System.ReadOnlySpan`1" />.</param>
107+
<summary>Creates a new <see cref="T:System.ReadOnlySpan`1" /> from a specified number of <typeparamref name="T" /> elements starting at a specified memory address.</summary>
108108
<remarks>
109109
<format type="text/markdown"><![CDATA[This constructor should be used with care, since it creates arbitrarily typed `T`s from a block of memory.]]></format>
110110
</remarks>

xml/System/Span`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ If `array` is `null`, this constructor returns a `null` `Span<T>`.
154154
<Parameter Name="length" Type="System.Int32" />
155155
</Parameters>
156156
<Docs>
157-
<param name="pointer">A pointer to the starting address of a specified number of bytes in memory.</param>
158-
<param name="length">The number of bytes to be included in the <see cref="T:System.Span`1" />.</param>
159-
<summary>Creates a new <see cref="T:System.Span`1" /> object from a specified number of bytes starting at a specified memory address.</summary>
157+
<param name="pointer">A pointer to the starting address of a specified number of <typeparamref name="T" /> elements in memory.</param>
158+
<param name="length">The number of <typeparamref name="T" /> elements to be included in the <see cref="T:System.Span`1" />.</param>
159+
<summary>Creates a new <see cref="T:System.Span`1" /> object from a specified number of <typeparamref name="T" /> elements starting at a specified memory address.</summary>
160160
<remarks>
161161
<format type="text/markdown"><![CDATA[
162162

0 commit comments

Comments
 (0)