Search
Get Started
C
C#
How does string.Split() work?
Original message was deleted
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
P
Pobiega
•
1/14/24, 7:48 PM
like
, what it does or how its implemented
?
S
sterbuk
•
1/14/24, 7:49 PM
look I am gonna explain my problem right
S
sterbuk
•
1/14/24, 7:49 PM
So I need to make a console calculator and he said to use contain and split
S
sterbuk
•
1/14/24, 7:50 PM
This is what I have but it doesn
't work because I have no idea how I need to use the split
P
Pobiega
•
1/14/24, 7:50 PM
You
're completely ignoring types here I see
P
Pobiega
•
1/14/24, 7:50 PM
thats
.
.
. not good
S
sterbuk
•
1/14/24, 7:50 PM
please explain
P
Pobiega
•
1/14/24, 7:50 PM
expects a
P
Pobiega
•
1/14/24, 7:50 PM
you are giving it a
P
Pobiega
•
1/14/24, 7:50 PM
these are not the same
, agreed
?
S
sterbuk
•
1/14/24, 7:51 PM
yes
P
Pobiega
•
1/14/24, 7:51 PM
so what
does is split a single string into an array of strings
S
sterbuk
•
1/14/24, 7:51 PM
ohhh
S
sterbuk
•
1/14/24, 7:51 PM
so getal1 is supossed to be an array
?
P
Pobiega
•
1/14/24, 7:51 PM
s
split by
would result in
S
sterbuk
•
1/14/24, 7:52 PM
yes
S
sterbuk
•
1/14/24, 7:52 PM
ohhhh
S
sterbuk
•
1/14/24, 7:52 PM
I get it now
S
sterbuk
•
1/14/24, 7:52 PM
thank you
S
sterbuk
•
1/14/24, 7:53 PM
I am gonna try it one sec
S
sterbuk
•
1/14/24, 8:01 PM
ive got it
S
sterbuk
•
1/14/24, 8:01 PM
bunny
Convert.ToInt32
Convert.ToInt32
string
string
string[]
string[]
string.Split
string.Split
5+10
5+10
+
+
[5,10]
[5,10]