Split Multiple character in C# -


i want split each words in string?

i write code

string s1=" welcome our website,thanku." string s2= s1.split(",-.".toarray()); 

but isn't working.

i believe want split on space, ,,. , -, try:

string[] splitarray = s1.split(',','-','.',' '); 

string.split returns array of string element, not single string element.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -