Click or drag to resize
StringSplit Method (Char, Int32)
Returns a string array that contains the substrings in this instance that are delimited by elements of a specified Unicode character array. A parameter specifies the maximum number of substrings to return.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public string[] Split(
	char[] separator,
	int count
)

Parameters

separator
Type: SystemChar
An array of Unicode characters that delimit the substrings in this instance, an empty array that contains no delimiters, or null.
count
Type: SystemInt32
The maximum number of substrings to return.

Return Value

Type: String
An array whose elements contain the substrings in this instance that are delimited by one or more characters in separator. For more information, see the Remarks section.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptioncount is negative.
See Also