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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -