C
C#2y ago
Pobiega

How does string.Split() work?

like, what it does or how its implemented?
10 Replies
sterbuk
sterbuk2y ago
look I am gonna explain my problem right So I need to make a console calculator and he said to use contain and split
sterbuk
sterbuk2y ago
This is what I have but it doesn't work because I have no idea how I need to use the split
No description
Pobiega
PobiegaOP2y ago
You're completely ignoring types here I see thats... not good
sterbuk
sterbuk2y ago
please explain
Pobiega
PobiegaOP2y ago
Convert.ToInt32 expects a string you are giving it a string[] these are not the same, agreed?
sterbuk
sterbuk2y ago
yes
Pobiega
PobiegaOP2y ago
so what string.Split does is split a single string into an array of strings
sterbuk
sterbuk2y ago
ohhh so getal1 is supossed to be an array?
Pobiega
PobiegaOP2y ago
s5+10 split by + would result in [5,10]
sterbuk
sterbuk2y ago
yes ohhhh I get it now thank you I am gonna try it one sec ive got it bunny

Did you find this page helpful?