Home
C# String.Split Cannot convert from string to char
In short instead of using
string[] MayArray = MyString.Split(",")
use
string[] MayArray = MyString.Split(',')
Note the single quotes around the string split delimiter.
Erm...why? Being an expert in C# - I haven't a bleeding clue. Using C# for some time now I always program for websites, I'm creating .aspx files and .aspx.cs file. Using the double quotes in the split has worked fine and dandy. Then the moment I suss out how to create a .exe file to be run from the command line it craps out! As such I suspect there's some difference in the parsers.
Anyhow, onwards...
Reader's Comments
Name
Comment
Add a RELEVANT link (not required)
Upload an image (not required)
Uploading...
Home