[Solved] How to set space between TextBox values into array


Try this:

var numbers = textBox1.Text.Split(' ');
List<int> lst = numbers.Select(item => int.Parse(item)).ToList();

It will be even better if you use method group like this:

List<int> lst = numbers.Select(int.Parse).ToList();

Then you can get it’s values like this:

lst[0] --> 1
lst[1] --> 32
and ...

0

solved How to set space between TextBox values into array