I have in my opinion thoroughly looked for the answers in this website, but unfortunately I haven't found any or I just suck at looking at it.
I have 2 forms and 1 controller class and 1 model class or data class. In addition, ControllerClass
has an array of the model class.
In Form1
I did a reference to the controller like this:
ControllerClass control = new ControllerClass();
In Form2
I want to reference from the ControllerClass
I referred to in Form1
.
Until now I have been doing something like:
ControllerClass control = new ControllerClass();
in Form2
but this just makes a new copy of the ControllerClass
which is not very helpful to me.
So how can I use the ControllerClass
that I instantiated in Form1
in Form2
?