asp.net.ph

String.Join Method ( String, String [ ], Int32, Int32 )

System Namespace   String Class


Concatenates a specified separator String between each element of a specified String array, yielding a single concatenated string. Parameters specify the first array element and number of elements to use.

[ VB ]
<Serializable>
Overloads Public Shared Function Join ( _
   ByVal separator As String, _
   ByVal value ( ) As String, _
   ByVal startIndex As Integer, _
   ByVal count As Integer _
) As String

[ C# ]
[ Serializable ]
public static string Join (
   string separator,
   string [ ] value,
   int startIndex,
   int count
);

[ C++ ]
[ Serializable ]
public: static String* Join (
   String* separator,
   String* value __gc [ ],
   int startIndex,
   int count
);

[ JScript ]
public Serializable
static function Join (
   separator : String,
   value : String [ ],
   startIndex : int,
   count : int
) : String;

Parameters

separator
A String.
value
An array of String.
startIndex
The first array element in value to use.
count
The number of elements of value to use.

Return Value

A String consisting of the strings in value joined by separator.

-or-

Empty if count is zero, value has no elements, or separator and all the elements of value are Empty.

Exceptions


Exception Type Condition
ArgumentOutOfRangeException startIndex plus count is greater than the number of elements in value.

Remarks

For example if separator is ", " and the elements of value are "apple", "orange", "grape", and "pear", Join ( separator, value, 1, 2 ) returns "orange, grape".

See Also

String Members   String.Join Overload List   Int32   Concat   Insert   Remove   Replace   Split   Substring   Trim Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph