Click or drag to resize
StringJoin Method (String, String, Int32, Int32)
Concatenates the specified elements of a string array, using the specified separator between each element.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static string Join(
	string separator,
	string[] value,
	int startIndex,
	int count
)

Parameters

separator
Type: SystemString
The string to use as a separator.
value
Type: SystemString
An array that contains the elements to concatenate.
startIndex
Type: SystemInt32
The first element in value to use.
count
Type: SystemInt32
The number of elements of value to use.

Return Value

Type: String
A string that consists of the strings in value delimited by the separator string. -or-Empty if count is zero, value has no elements, or separator and all the elements of value are Empty.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
ArgumentOutOfRangeExceptionstartIndex or count is less than 0.-or- startIndex plus count is greater than the number of elements in value.
OutOfMemoryExceptionOut of memory.
See Also