StringBuilder.AppendJoin 方法

定义

重载

AppendJoin(String, Object[])

使用各成员之间指定的分隔符连接所提供的对象数组中的元素的字符串表示形式,然后将结果附加到字符串生成器的当前实例。Concatenates the string representations of the elements in the provided array of objects, using the specified separator between each member, then appends the result to the current instance of the string builder.

AppendJoin(String, String[])

使用各字符串之间指定的分隔符连接所提供的数组的字符串,然后将结果附加到字符串生成器的当前实例。Concatenates the strings of the provided array, using the specified separator between each string, then appends the result to the current instance of the string builder.

AppendJoin(Char, Object[])

使用各成员之间指定的字符分隔符连接所提供的对象数组中的元素的字符串表示形式,然后将结果附加到字符串生成器的当前实例。Concatenates the string representations of the elements in the provided array of objects, using the specified char separator between each member, then appends the result to the current instance of the string builder.

AppendJoin(Char, String[])

使用各字符串之间指定的字符分隔符连接所提供的数组的字符串,然后将结果附加到字符串生成器的当前实例。Concatenates the strings of the provided array, using the specified char separator between each string, then appends the result to the current instance of the string builder.

AppendJoin<T>(Char, IEnumerable<T>)

使用各成员之间指定的字符分隔符连接和附加集合的成员。Concatenates and appends the members of a collection, using the specified char separator between each member.

AppendJoin<T>(String, IEnumerable<T>)

使用各成员之间指定的分隔符连接和附加集合的成员。Concatenates and appends the members of a collection, using the specified separator between each member.

AppendJoin(String, Object[])

使用各成员之间指定的分隔符连接所提供的对象数组中的元素的字符串表示形式,然后将结果附加到字符串生成器的当前实例。Concatenates the string representations of the elements in the provided array of objects, using the specified separator between each member, then appends the result to the current instance of the string builder.

public:
 System::Text::StringBuilder ^ AppendJoin(System::String ^ separator, ... cli::array <System::Object ^> ^ values);
public System.Text.StringBuilder AppendJoin (string? separator, params object?[] values);
public System.Text.StringBuilder AppendJoin (string separator, params object[] values);
member this.AppendJoin : string * obj[] -> System.Text.StringBuilder
Public Function AppendJoin (separator As String, ParamArray values As Object()) As StringBuilder

参数

separator
String

要用作分隔符的字符串。The string to use as a separator. separator 包括在联接的字符串中(仅当 values 具有多个元素时)。separator is included in the joined strings only if values has more than one element.

values
Object[]

一个数组,包含要连接和附加到字符串生成器的当前实例的字符串。An array that contains the strings to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于

AppendJoin(String, String[])

使用各字符串之间指定的分隔符连接所提供的数组的字符串,然后将结果附加到字符串生成器的当前实例。Concatenates the strings of the provided array, using the specified separator between each string, then appends the result to the current instance of the string builder.

public:
 System::Text::StringBuilder ^ AppendJoin(System::String ^ separator, ... cli::array <System::String ^> ^ values);
public System.Text.StringBuilder AppendJoin (string? separator, params string?[] values);
public System.Text.StringBuilder AppendJoin (string separator, params string[] values);
member this.AppendJoin : string * string[] -> System.Text.StringBuilder
Public Function AppendJoin (separator As String, ParamArray values As String()) As StringBuilder

参数

separator
String

要用作分隔符的字符串。The string to use as a separator. separator 包括在联接的字符串中(仅当 values 具有多个元素时)。separator is included in the joined strings only if values has more than one element.

values
String[]

一个数组,包含要连接和附加到字符串生成器的当前实例的字符串。An array that contains the strings to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于

AppendJoin(Char, Object[])

使用各成员之间指定的字符分隔符连接所提供的对象数组中的元素的字符串表示形式,然后将结果附加到字符串生成器的当前实例。Concatenates the string representations of the elements in the provided array of objects, using the specified char separator between each member, then appends the result to the current instance of the string builder.

public:
 System::Text::StringBuilder ^ AppendJoin(char separator, ... cli::array <System::Object ^> ^ values);
public System.Text.StringBuilder AppendJoin (char separator, params object?[] values);
public System.Text.StringBuilder AppendJoin (char separator, params object[] values);
member this.AppendJoin : char * obj[] -> System.Text.StringBuilder
Public Function AppendJoin (separator As Char, ParamArray values As Object()) As StringBuilder

参数

separator
Char

要用作分隔符的字符。The character to use as a separator. separator 包括在联接的字符串中(仅当 values 具有多个元素时)。separator is included in the joined strings only if values has more than one element.

values
Object[]

一个数组,包含要连接和附加到字符串生成器的当前实例的字符串。An array that contains the strings to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于

AppendJoin(Char, String[])

使用各字符串之间指定的字符分隔符连接所提供的数组的字符串,然后将结果附加到字符串生成器的当前实例。Concatenates the strings of the provided array, using the specified char separator between each string, then appends the result to the current instance of the string builder.

public:
 System::Text::StringBuilder ^ AppendJoin(char separator, ... cli::array <System::String ^> ^ values);
public System.Text.StringBuilder AppendJoin (char separator, params string?[] values);
public System.Text.StringBuilder AppendJoin (char separator, params string[] values);
member this.AppendJoin : char * string[] -> System.Text.StringBuilder
Public Function AppendJoin (separator As Char, ParamArray values As String()) As StringBuilder

参数

separator
Char

要用作分隔符的字符。The character to use as a separator. separator 包括在联接的字符串中(仅当 values 具有多个元素时)。separator is included in the joined strings only if values has more than one element.

values
String[]

一个数组,包含要连接和附加到字符串生成器的当前实例的字符串。An array that contains the strings to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于

AppendJoin<T>(Char, IEnumerable<T>)

使用各成员之间指定的字符分隔符连接和附加集合的成员。Concatenates and appends the members of a collection, using the specified char separator between each member.

public:
generic <typename T>
 System::Text::StringBuilder ^ AppendJoin(char separator, System::Collections::Generic::IEnumerable<T> ^ values);
public System.Text.StringBuilder AppendJoin<T> (char separator, System.Collections.Generic.IEnumerable<T> values);
member this.AppendJoin : char * seq<'T> -> System.Text.StringBuilder
Public Function AppendJoin(Of T) (separator As Char, values As IEnumerable(Of T)) As StringBuilder

类型参数

T

values 成员的类型。The type of the members of values.

参数

separator
Char

要用作分隔符的字符。The character to use as a separator. separator 包括在连接和附加的字符串中(仅当 values 具有多个元素时)。separator is included in the concatenated and appended strings only if values has more than one element.

values
IEnumerable<T>

一个集合,包含要连接和附加到字符串生成器的当前实例的对象。A collection that contains the objects to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于

AppendJoin<T>(String, IEnumerable<T>)

使用各成员之间指定的分隔符连接和附加集合的成员。Concatenates and appends the members of a collection, using the specified separator between each member.

public:
generic <typename T>
 System::Text::StringBuilder ^ AppendJoin(System::String ^ separator, System::Collections::Generic::IEnumerable<T> ^ values);
public System.Text.StringBuilder AppendJoin<T> (string? separator, System.Collections.Generic.IEnumerable<T> values);
public System.Text.StringBuilder AppendJoin<T> (string separator, System.Collections.Generic.IEnumerable<T> values);
member this.AppendJoin : string * seq<'T> -> System.Text.StringBuilder
Public Function AppendJoin(Of T) (separator As String, values As IEnumerable(Of T)) As StringBuilder

类型参数

T

values 成员的类型。The type of the members of values.

参数

separator
String

要用作分隔符的字符串。The string to use as a separator. separator 包括在连接和附加的字符串中(仅当 values 具有多个元素时)。separator is included in the concatenated and appended strings only if values has more than one element.

values
IEnumerable<T>

一个集合,包含要连接和附加到字符串生成器的当前实例的对象。A collection that contains the objects to concatenate and append to the current instance of the string builder.

返回

StringBuilder

完成追加操作后对此实例的引用。A reference to this instance after the append operation has completed.

适用于