|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
fill an arrayI have a textbox (multine = true) with data beneath each other: 4 0 6 3 ... I would like the data on top of the textbox (4) in a array at place 0, de data below (0) to place 1 of the Array, data below (6) to place 2 of the array,...... How can i program it? KLenne Hi KLenne,
I'm not exactly sure what you are asking, but in a textbox with a single= = number on a line and white space between you can obtain a list of the = numbers like this string[] lines =3D textBox1.Text.Split('\n'); ArrayList list =3D new ArrayList(); foreach (string s in lines) { string t =3D s.Trim(); if (t.Length > 0) list.Add(t); } -- = Happy Coding! Morten Wennevik [C# MVP] When you type a number in a textbox: number then backspace and the next
number. You get a textbox like tis: 4 2 1 A backspace is 2 karakters i think, how can I filter it and write the 4 in array place (0), the 2 in array place (1),..... it is a vb.net 2005 program Greetz klenne Its no longer needed, i found the solution somewhere else.
Thx for helping |
|||||||||||||||||||||||