Home All Groups Group Topic Archive Search About
Author
10 Oct 2006 9:56 AM
klenne
I have a  .net question,

I 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

Author
10 Oct 2006 11:14 AM
Morten Wennevik
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]
Author
10 Oct 2006 12:05 PM
klenne
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
Author
10 Oct 2006 12:29 PM
klenne
Its no longer needed, i found the solution somewhere else.

Thx for helping
Author
11 Oct 2006 5:00 PM
Tim Van Wassenhove
On 2006-10-10, klenne <basvanh***@gmail.com> wrote:
> Its no longer needed, i found the solution somewhere else.
>
> Thx for helping

In that case i would suggest you post the solution too.. This way people
after you can find the answer too...

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.be>

AddThis Social Bookmark Button