How does one access objects using functions in a class you define in a .cs file that is seperate from the form whose objects you want to modify?
Example:
I have MyForm.cs with private myTextBox in it.
I also have MyClass.cs which has the definition of MyClass.
They both exist in the same namespace.
If I want to write a function in MyClass that changes the text in myTextBox how would I do that?
Of course, right now it is inaccessible due to its protection level. I did this once a long time ago, but can't remember. I think it either involved sending like a pointer to a form or a friend declaration or something.
Please help. Thanks.
Example:
I have MyForm.cs with private myTextBox in it.
I also have MyClass.cs which has the definition of MyClass.
They both exist in the same namespace.
If I want to write a function in MyClass that changes the text in myTextBox how would I do that?
Of course, right now it is inaccessible due to its protection level. I did this once a long time ago, but can't remember. I think it either involved sending like a pointer to a form or a friend declaration or something.
Please help. Thanks.