c# - How can I use String.Split with a String delimiter? -
i have string so:
"abcdef--split--ghiklmo--split--pqrstuvwxyz"
what trying split string --split-- being delimiter, have tried following:
var array = item.split('--split--');
but error:
too many characters in character literal
is there away this?
the problem above code trying pass in string char instead of using correct overload:
item.split(new []{"--split--"}, stringsplitoptions.none)
Comments
Post a Comment