Skip to content

Commit fcc3a28

Browse files
committed
Document a behavior of string.Create
1 parent 5e37f39 commit fcc3a28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xml/System/String.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,6 +4364,8 @@ The following example demonstrates the <xref:System.String.CopyTo%2A> method.
43644364
<format type="text/markdown"><![CDATA[
43654365
## Remarks
43664366
The initial content of the destination span passed to `action` is undefined. Therefore, it is the delegate's responsibility to ensure that every element of the span is assigned. Otherwise, the resulting string could contain random characters.
4367+
4368+
In order to support interop scenarios, the underlying buffer is guaranteed to be at least 1 greater than represented by the span parameter of the action callback. This additional index represents the null-terminator and if written that is the only value supported, writing any value other than the null-terminator will result in corrupting the string and is considered undefined behavior.
43674369
]]></format>
43684370
</remarks>
43694371
</Docs>

0 commit comments

Comments
 (0)