I
I
IliaBrz2017-12-02 15:00:11
Programming
IliaBrz, 2017-12-02 15:00:11

How to convert the value of a multiline TextBox to an array, where each line of it will be a value in the array?

How to convert the value of a multiline TextBox to an array, where each line of it will be a value in the array?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2017-12-02
@GavriKos

Do a split on the line break character, for example.

I
Ivan Arxont, 2017-12-02
@arxont

In addition to the above method, I will add the use of TextBox.Lines - https://msdn.microsoft.com/en-us/library/system.wi...

var lines = new List<string>();

lines.AddRange(textBox1.Lines);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question