R
rno
Hi,
I am sorry for this n00b question, but I'm stumped.
I created a form application (using C#.NET Express). For now, it is a
simple, singe form, that contains 1 button and 1 textbox.
The button calls a method in another class. My question: how do I read
the forms' textbox text from that class?
My problem seems to be getting a proper reference to the form in my
class. My background is VB6, where this was straightforward.
I tried the following:
-make the textbox public,
-create a public property in the form, that returns the textbox text,
-passing the form object ('this') to a method in the called (static)
class
-passing the form object ('this') to the class' constructor (non-static
class)
But I can't seem to get to the form's textbox text, as Intellisense and
the debugger keep telling me.
I feel like I am going about this the wrong way, and that I am
misunderstanding some key language concept.
Would really appreciate any pointers to get me going.
tia
arno
I am sorry for this n00b question, but I'm stumped.
I created a form application (using C#.NET Express). For now, it is a
simple, singe form, that contains 1 button and 1 textbox.
The button calls a method in another class. My question: how do I read
the forms' textbox text from that class?
My problem seems to be getting a proper reference to the form in my
class. My background is VB6, where this was straightforward.
I tried the following:
-make the textbox public,
-create a public property in the form, that returns the textbox text,
-passing the form object ('this') to a method in the called (static)
class
-passing the form object ('this') to the class' constructor (non-static
class)
But I can't seem to get to the form's textbox text, as Intellisense and
the debugger keep telling me.
I feel like I am going about this the wrong way, and that I am
misunderstanding some key language concept.
Would really appreciate any pointers to get me going.
tia
arno