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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -