Skip to content

Commit 1bb809a

Browse files
authored
Merge pull request #4227 from ssimek/master
Remove incorrect return value descriptions from String.Join
2 parents de03a63 + 2d8042b commit 1bb809a

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

xml/System/String.xml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8315,7 +8315,7 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
83158315

83168316
-or-
83178317

8318-
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements or all the elements of <paramref name="values" /> are <see langword="null" />.</returns>
8318+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements.</returns>
83198319
<remarks>To be added.</remarks>
83208320
<exception cref="T:System.ArgumentNullException">
83218321
<paramref name="value" /> is <see langword="null" />.</exception>
@@ -8366,7 +8366,7 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
83668366

83678367
-or-
83688368

8369-
<see cref="F:System.String.Empty" /> if <paramref name="value" /> has zero elements or all the elements of <paramref name="value" /> are <see langword="null" />.</returns>
8369+
<see cref="F:System.String.Empty" /> if <paramref name="value" /> has zero elements.</returns>
83708370
<remarks>To be added.</remarks>
83718371
<exception cref="T:System.ArgumentNullException">
83728372
<paramref name="value" /> is <see langword="null" />.</exception>
@@ -8420,11 +8420,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
84208420
<param name="separator">The string to use as a separator.<paramref name="separator" /> is included in the returned string only if <paramref name="values" /> has more than one element.</param>
84218421
<param name="values">A collection that contains the strings to concatenate.</param>
84228422
<summary>Concatenates the members of a constructed <see cref="T:System.Collections.Generic.IEnumerable`1" /> collection of type <see cref="T:System.String" />, using the specified separator between each member.</summary>
8423-
<returns>A string that consists of the members of <paramref name="values" /> delimited by the <paramref name="separator" /> string.
8423+
<returns>A string that consists of the elements of <paramref name="values" /> delimited by the <paramref name="separator" /> string.
84248424

84258425
-or-
84268426

8427-
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements or all the elements of <paramref name="values" /> are <see langword="null" />.</returns>
8427+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements.</returns>
84288428
<remarks>
84298429
<format type="text/markdown"><![CDATA[
84308430

@@ -8504,7 +8504,15 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
85048504
<param name="separator">The string to use as a separator. <paramref name="separator" /> is included in the returned string only if <paramref name="values" /> has more than one element.</param>
85058505
<param name="values">An array that contains the elements to concatenate.</param>
85068506
<summary>Concatenates the elements of an object array, using the specified separator between each element.</summary>
8507-
<returns>A string that consists of the elements of <paramref name="values" /> delimited by the <paramref name="separator" /> string. If <paramref name="values" /> is an empty array, the method returns <see cref="F:System.String.Empty" />.</returns>
8507+
<returns>A string that consists of the elements of <paramref name="values" /> delimited by the <paramref name="separator" /> string.
8508+
8509+
-or-
8510+
8511+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements.
8512+
8513+
-or-
8514+
8515+
.NET Framework only: <see cref="F:System.String.Empty" /> if the first element of <paramref name="values" /> is <see langword="null" />.</returns>
85088516
<remarks>
85098517
<format type="text/markdown"><![CDATA[
85108518

@@ -8525,7 +8533,7 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
85258533
<paramref name="values" /> is <see langword="null" />.</exception>
85268534
<exception cref="T:System.OutOfMemoryException">The length of the resulting string overflows the maximum allowed length (<see cref="F:System.Int32.MaxValue" />).</exception>
85278535
<block subset="none" type="usage">
8528-
<para>If the first element of <paramref name="values" /> is <see langword="null" />, the <see cref="M:System.String.Join(System.String,System.Object[])" /> method does not concatenate the elements in <paramref name="values" /> but instead returns <see cref="F:System.String.Empty" />. A number of workarounds for this issue are available. The easiest is to assign a value of <see cref="F:System.String.Empty" /> to the first element of the array, as the following example shows.
8536+
<para>.NET Framework only: If the first element of <paramref name="values" /> is <see langword="null" />, the <see cref="M:System.String.Join(System.String,System.Object[])" /> method does not concatenate the elements in <paramref name="values" /> but instead returns <see cref="F:System.String.Empty" />. A number of workarounds for this issue are available. The easiest is to assign a value of <see cref="F:System.String.Empty" /> to the first element of the array, as the following example shows.
85298537

85308538
[!code-csharp-interactive[System.String.Join#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.join/cs/joinfix1.cs#6)]
85318539
[!code-vb[System.String.Join#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.join/vb/joinfix1.vb#6)]</para>
@@ -8586,7 +8594,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
85868594
<param name="separator">The string to use as a separator. <paramref name="separator" /> is included in the returned string only if <paramref name="value" /> has more than one element.</param>
85878595
<param name="value">An array that contains the elements to concatenate.</param>
85888596
<summary>Concatenates all the elements of a string array, using the specified separator between each element.</summary>
8589-
<returns>A string that consists of the elements in <paramref name="value" /> delimited by the <paramref name="separator" /> string. If <paramref name="value" /> is an empty array, the method returns <see cref="F:System.String.Empty" />.</returns>
8597+
<returns>A string that consists of the elements in <paramref name="value" /> delimited by the <paramref name="separator" /> string.
8598+
8599+
-or-
8600+
8601+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has zero elements.</returns>
85908602
<remarks>
85918603
<format type="text/markdown"><![CDATA[
85928604

@@ -8648,11 +8660,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
86488660
<param name="startIndex">The first item in <paramref name="value" /> to concatenate.</param>
86498661
<param name="count">The number of elements from <paramref name="value" /> to concatenate, starting with the element in the <paramref name="startIndex" /> position.</param>
86508662
<summary>Concatenates an array of strings, using the specified separator between each member, starting with the element in <paramref name="value" /> located at the <paramref name="startIndex" /> position, and concatenating up to <paramref name="count" /> elements.</summary>
8651-
<returns>A string that consists of the elements of <paramref name="value" /> delimited by the <paramref name="separator" /> character.
8663+
<returns>A string that consists of <paramref name="count" /> elements of <paramref name="value" /> starting at <paramref name="startIndex" /> delimited by the <paramref name="separator" /> character.
86528664

86538665
-or-
86548666

8655-
<see cref="F:System.String.Empty" /> if <paramref name="count" /> is zero, <paramref name="value" /> has no elements, or all the elements of <paramref name="value" /> are <see langword="null" /> or <see cref="F:System.String.Empty" />.</returns>
8667+
<see cref="F:System.String.Empty" /> if <paramref name="count" /> is zero.</returns>
86568668
<remarks>To be added.</remarks>
86578669
<exception cref="T:System.ArgumentNullException">
86588670
<paramref name="value" /> is <see langword="null" />.</exception>
@@ -8718,11 +8730,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
87188730
<param name="startIndex">The first element in <paramref name="value" /> to use.</param>
87198731
<param name="count">The number of elements of <paramref name="value" /> to use.</param>
87208732
<summary>Concatenates the specified elements of a string array, using the specified separator between each element.</summary>
8721-
<returns>A string that consists of the strings in <paramref name="value" /> delimited by the <paramref name="separator" /> string.
8733+
<returns>A string that consists of <paramref name="count" /> elements of <paramref name="value" /> starting at <paramref name="startIndex" /> delimited by the <paramref name="separator" /> character.
87228734

87238735
-or-
87248736

8725-
<see cref="F:System.String.Empty" /> if <paramref name="count" /> is zero, <paramref name="value" /> has no elements, or <paramref name="separator" /> and all the elements of <paramref name="value" /> are <see cref="F:System.String.Empty" />.</returns>
8737+
<see cref="F:System.String.Empty" /> if <paramref name="count" /> is zero.</returns>
87268738
<remarks>
87278739
<format type="text/markdown"><![CDATA[
87288740

@@ -8789,7 +8801,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
87898801
<param name="separator">The character to use as a separator. <paramref name="separator" /> is included in the returned string only if <paramref name="values" /> has more than one element.</param>
87908802
<param name="values">A collection that contains the objects to concatenate.</param>
87918803
<summary>Concatenates the members of a collection, using the specified separator between each member.</summary>
8792-
<returns>A string that consists of the members of <paramref name="values" /> delimited by the <paramref name="separator" /> character. If <paramref name="values" /> has no members, the method returns <see cref="F:System.String.Empty" />.</returns>
8804+
<returns>A string that consists of the members of <paramref name="values" /> delimited by the <paramref name="separator" /> character.
8805+
8806+
-or-
8807+
8808+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has no elements.</returns>
87938809
<remarks>To be added.</remarks>
87948810
<exception cref="T:System.ArgumentNullException">
87958811
<paramref name="values" /> is <see langword="null" />.</exception>
@@ -8847,7 +8863,11 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
88478863
<param name="separator">The string to use as a separator. <paramref name="separator" /> is included in the returned string only if <paramref name="values" /> has more than one element.</param>
88488864
<param name="values">A collection that contains the objects to concatenate.</param>
88498865
<summary>Concatenates the members of a collection, using the specified separator between each member.</summary>
8850-
<returns>A string that consists of the members of <paramref name="values" /> delimited by the <paramref name="separator" /> string. If <paramref name="values" /> has no members, the method returns <see cref="F:System.String.Empty" />.</returns>
8866+
<returns>A string that consists of the elements of <paramref name="values" /> delimited by the <paramref name="separator" /> string.
8867+
8868+
-or-
8869+
8870+
<see cref="F:System.String.Empty" /> if <paramref name="values" /> has no elements.</returns>
88518871
<remarks>
88528872
<format type="text/markdown"><![CDATA[
88538873

0 commit comments

Comments
 (0)