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

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

Parameters

separator
Type: SystemChar
An array of Unicode characters that delimit the substrings in this string, an empty array that contains no delimiters, or null.
options
Type: SystemStringSplitOptions
RemoveEmptyEntries to omit empty array elements from the array returned; or None to include empty array elements in the array returned.

Return Value

Type: String
An array whose elements contain the substrings in this string that are delimited by one or more characters in separator. For more information, see the Remarks section.
Exceptions
ExceptionCondition
ArgumentExceptionoptions is not one of the StringSplitOptions values.
See Also