Split
Split by expression
Source
public static string[] Split(this string value, string regexPattern)
{
return value.Split(regexPattern, RegexOptions.None);
}
public static string[] Split(this string value, string regexPattern,
RegexOptions options)
{
return Regex.Split(value, regexPattern, options);
}
Example
var obj = "abc,def,ghi";
string[] arrays = obj.Split(",");