Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# Splitting strings with two characters 1

Status
Not open for further replies.

jl280328

Programmer
Jun 15, 2006
97
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.
 
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top