Skip to content

Commit b84d718

Browse files
rzikmManickaP
andauthored
Clarify that the array passed to ByteArrayContent should not be modified. (#8484)
* Clarify that the array passed to ByteArrayContent should not be modified. * Update xml/System.Net.Http/ByteArrayContent.xml Co-authored-by: Marie Píchová <[email protected]> Co-authored-by: Marie Píchová <[email protected]>
1 parent f2cc991 commit b84d718

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

xml/System.Net.Http/ByteArrayContent.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,14 @@
7979
<Docs>
8080
<param name="content">The content used to initialize the <see cref="T:System.Net.Http.ByteArrayContent" />.</param>
8181
<summary>Initializes a new instance of the <see cref="T:System.Net.Http.ByteArrayContent" /> class.</summary>
82-
<remarks>To be added.</remarks>
82+
<remarks>
83+
<format type="text/markdown"><![CDATA[
84+
85+
## Remarks
86+
The <xref:System.Net.Http.ByteArrayContent> class does not internally copy the provided byte array but keeps a reference to it instead. Callers should not modify the data in the array until the content is sent.
87+
88+
]]></format>
89+
</remarks>
8390
<exception cref="T:System.ArgumentNullException">The <paramref name="content" /> parameter is <see langword="null" />.</exception>
8491
</Docs>
8592
</Member>
@@ -122,7 +129,9 @@
122129
<format type="text/markdown"><![CDATA[
123130
124131
## Remarks
125-
Only the range specified by the `offset` parameter and the `count` parameter is used as content. Syntax
132+
The <xref:System.Net.Http.ByteArrayContent> class does not internally copy the provided byte array but keeps a reference to it instead. Callers should not modify the data in the array until the content is sent.
133+
134+
Only the range specified by the `offset` parameter and the `count` parameter is used as content.
126135
127136
]]></format>
128137
</remarks>

0 commit comments

Comments
 (0)