how to get an array from text box in C# ? or as i call it multiple input.

we all no arrays , the difference between arrays and strings is that strings are separated by ( "" )but arrays separated by ( , ) , so what if we want to get an list of numbers into an array from one text box ?
to do so simply learn then copy and paste the code below :


var number=textBox1.Text.Split(',').Select(s => double.Parse(s.Trim())).ToArray();

Comments

Popular posts from this blog

Adding navigation to your web pages with one line of php code

Voice Recognition Code with C#