Jan 24, 2007 #1 jl280328 Programmer Joined Jun 15, 2006 Messages 97 Location US Is there a way to split a string using more than one character in C#? I am using this line of code: Code: string[] NameSplit = itmPlayer.Text.Split(new char[] { ", " }); But get an error saying there are too many characters in character literal.
Is there a way to split a string using more than one character in C#? I am using this line of code: Code: string[] NameSplit = itmPlayer.Text.Split(new char[] { ", " }); But get an error saying there are too many characters in character literal.
Jan 24, 2007 1 #2 ca8msm Programmer Joined May 9, 2002 Messages 11,327 Location GB You'll have to use the Split method from the RegEx class if you want to split by more than 1 character. ____________________________________________________________ Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results. Upvote 0 Downvote
You'll have to use the Split method from the RegEx class if you want to split by more than 1 character. ____________________________________________________________ Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.