Read multilined textBox line by line

Discussion in 'C++' started by Jennifer84, Sep 30, 2010.

  1. Jennifer84

    Jennifer84 New Member

    Joined:
    Sep 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I wonder how it is possible to read a multilined textBox line by line into a List.

    I dont get the below code to compile so I might be missing something here ?

    string[] mylines = TextBox1->Text->Split(Environment::Newline);

    List^ getLines = gcnew List();
    String^ getLine = "";
    for (int i = 0; i < mylines->Length; i++)
    {
    getLine = mylines->ToString();
    getLines->Add(getLine);
    }
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice