I have a class itself called clientChat that does basic networking stuff. I have several other classes related to various forms of windows. In my first form, I have a variable related to the chat class, for example:
clientChat cc = new clientChat();
Everything works fine, the class is initialized, and everything is moving. After the first forms are completed, I will raise my second form, which is obviously associated with the new class file.
Now my question is: how can I refer to what happens in the clientChat class without installing a new instance of the class? Do I need to transfer data from the form to networkstream , and if I create a new instance of the class, it will not require a new connection to the server and basically requires that everything starts from the moment it is "new"? I'm a bit confused and any help would be great, thanks. C # on .NET4.0
source share