How to convert a string variable to array?


#1

Hi can any one guide me how to convert a string into array?

ex: i have a string variable with data as follows

Cricket
Football
Basketball

can i convert it to array, if yes can you suggest a solution?


#2

Hi @balu,

Yes you can…

Arrayvariable=StrValue.Split(Environment.Newline,StringSplitOptions.RemoveEmptyEntries)

Regards,
Arivu