From 2d8042b901877d485c7dc87da154d8babbbf1c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Ctefan=20S=CC=8Cimek?= Date: Wed, 13 May 2020 15:36:59 +0200 Subject: [PATCH] Improve return value descriptions of String.Join --- xml/System/String.xml | 46 +++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/xml/System/String.xml b/xml/System/String.xml index cb8c27f17e9..25c3468df5b 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -8373,7 +8373,7 @@ A string is empty if it is explicitly assigned an empty string ("") or if has zero elements or all the elements of are . + if has zero elements. To be added. is . @@ -8424,7 +8424,7 @@ A string is empty if it is explicitly assigned an empty string ("") or if has zero elements or all the elements of are . + if has zero elements. To be added. is . @@ -8478,11 +8478,11 @@ A string is empty if it is explicitly assigned an empty string ("") or The string to use as a separator. is included in the returned string only if has more than one element. A collection that contains the strings to concatenate. Concatenates the members of a constructed collection of type , using the specified separator between each member. - A string that consists of the members of delimited by the string. + A string that consists of the elements of delimited by the string. -or- - if has zero elements or all the elements of are . + if has zero elements. The string to use as a separator. is included in the returned string only if has more than one element. An array that contains the elements to concatenate. Concatenates the elements of an object array, using the specified separator between each element. - A string that consists of the elements of delimited by the string. If is an empty array, the method returns . + A string that consists of the elements of delimited by the string. + +-or- + + if has zero elements. + +-or- + +.NET Framework only: if the first element of is . is . The length of the resulting string overflows the maximum allowed length (). - If the first element of is , the method does not concatenate the elements in but instead returns . A number of workarounds for this issue are available. The easiest is to assign a value of to the first element of the array, as the following example shows. + .NET Framework only: If the first element of is , the method does not concatenate the elements in but instead returns . A number of workarounds for this issue are available. The easiest is to assign a value of to the first element of the array, as the following example shows. [!code-csharp-interactive[System.String.Join#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.join/cs/joinfix1.cs#6)] [!code-vb[System.String.Join#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.join/vb/joinfix1.vb#6)] @@ -8646,7 +8654,11 @@ A string is empty if it is explicitly assigned an empty string ("") or The string to use as a separator. is included in the returned string only if has more than one element. An array that contains the elements to concatenate. Concatenates all the elements of a string array, using the specified separator between each element. - A string that consists of the elements in delimited by the string. If is an empty array, the method returns . + A string that consists of the elements in delimited by the string. + +-or- + + if has zero elements. The first item in to concatenate. The number of elements from to concatenate, starting with the element in the position. Concatenates an array of strings, using the specified separator between each member, starting with the element in located at the position, and concatenating up to elements. - A string that consists of the elements of delimited by the character. + A string that consists of elements of starting at delimited by the character. -or- - if is zero, has no elements, or all the elements of are or . + if is zero. To be added. is . @@ -8780,11 +8792,11 @@ A string is empty if it is explicitly assigned an empty string ("") or The first element in to use. The number of elements of to use. Concatenates the specified elements of a string array, using the specified separator between each element. - A string that consists of the strings in delimited by the string. + A string that consists of elements of starting at delimited by the character. -or- - if is zero, has no elements, or and all the elements of are . + if is zero. The character to use as a separator. is included in the returned string only if has more than one element. A collection that contains the objects to concatenate. Concatenates the members of a collection, using the specified separator between each member. - A string that consists of the members of delimited by the character. If has no members, the method returns . + A string that consists of the members of delimited by the character. + +-or- + + if has no elements. To be added. is . @@ -8911,7 +8927,11 @@ A string is empty if it is explicitly assigned an empty string ("") or The string to use as a separator. is included in the returned string only if has more than one element. A collection that contains the objects to concatenate. Concatenates the members of a collection, using the specified separator between each member. - A string that consists of the members of delimited by the string. If has no members, the method returns . + A string that consists of the elements of delimited by the string. + +-or- + + if has no elements.