System.StringSplitOptions Enumeration

Specifies whether applicable erload:System.String.Split method overloads include or omit empty substrings from the return value.

Syntax

[System.Flags]
[System.Runtime.InteropServices.ComVisible(false)]
public enum StringSplitOptions

Remarks

The erload:System.String.Split method returns an array of the substrings in a given string that are delimited by specified characters or strings. Adjacent delimiters yield an array element that contains an empty string (""). The values of the StringSplitOptions enumeration specify whether an array element that contains an empty string is included in the returned array.

Specify the StringSplitOptions.None value to invoke the default behavior of the erload:System.String.Split method, which is to return an array of both empty substrings and substrings that are not empty. Specify the StringSplitOptions.RemoveEmptyEntries value to cause the erload:System.String.Split method to return an array consisting solely of substrings that are not empty.

Members

Member NameDescription
None

The return value includes array elements that contain an empty string

RemoveEmptyEntries

The return value does not include array elements that contain an empty string

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0