how to split a astring based on new line
input -
abc
ert
4234
asd
I want to split this and save in 4 separate variables
how to split a astring based on new line
input -
abc
ert
4234
asd
I want to split this and save in 4 separate variables
A note here is that when you split the string you will automatically get a array of the strings which you can simple access using the index 0…3.
Now you can choose to assign then individually to new 4 variables or you can use them using their array index.
try:
yourString.Split(Environment.NewLine.TocharArray)
i think the delimited of this is new line right,can you replace the new line with another delimited and from then assign it to array i hope it make sense @Gaurav_Bahuguna
cheers
Happy learning