I am developing a form application (UI) through which I need to connect a client to multiple servers.
For that, i would require an array of either Socket objects or TcpClient objects.
My dilemma is where i should put this array.
I cannot put the array in the static class containing the Main() method.
Also, i dont think it would be good to put it inside Main() (although, i may be wrong.)
I thought of placing it in an independent class so that i may add some functionality if required.

class Clients
private TcpClient[] tcpClients = new TcpClients[5];

But, i would face lots of problems here (like accessing the sockets).
Would anyone shed some light on this? I know this is a bit weird question. :)

7 Years
Discussion Span
Last Post by Bhoot

okay fine..it was a stupid question. After an hour or so, it clicked me to place the array in the class that i (infact, Visual Studio) would derive from Form class. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.