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) 

msdn documentation


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -