Problem with List textbox

Discussion in 'C#' started by daniel1000, Sep 30, 2010.

  1. daniel1000

    daniel1000 New Member

    Joined:
    Sep 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi everybody.

    I have got a textbox called "textbox1". And an object, called player[0]
    There I generated a list: public List textboxInformation = new List();

    In the main method i wrote:
    player[0].textboxInformation .Add(textbox1);

    I want to access this box, by calling the "object.textboxInformation"

    If i count "player[0].textboxInformation.Count" , i get "1" as a result.
    So it has to be stored.

    But i can´t access it by:
    MessageBox.Show(player[0].textboxInformation [0].Text);
    And I also can´t modify the text:
    spieler[0].textboxInformation [0].Text = "TEST";

    It always says, its no object...

    Does anyone know, who to access it correctly?


    Thx alot!
     

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