StringJoin Method (String, String, Int32, Int32) |
Concatenates the specified elements of a string array, using the specified separator between each element.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax 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:
StringA 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 Exception | Condition |
---|
ArgumentNullException | value is null. |
ArgumentOutOfRangeException | startIndex or count is less than 0.-or- startIndex plus count is greater than the number of elements in value. |
OutOfMemoryException | Out of memory. |
See Also