repkin05

repkin05

  • NA
  • 10
  • 0

How can I create object each class

May 7 2004 2:24 PM
I have big problem and please help me. I have two classes first one - Form1 class and second one - compStudentList class and there is a textbox on Form1 like that public System.Windows.Forms.TextBox textBox1; I have create compStudentList object on Form1 class like that public compStudentList objStudent = new compStudentList(); and I want to change the text property of textBox1 over the compStudentList class like that void getFirstStudent() { ?.textBox1.text = "something"; } I want to do that over void function. I cant do that on compStudentList class public Form1 objForm = new Form1(); because the program crashing. How I can fix this problem? How can I reach textBox1 over the compStudentList? Help me.

Answers (2)