Rags is correct. You need to have at least a basic understanding of OOP.
From the criteria you've listed, I would make an object such as:
Code:
class UserObject
{
public Socket socket;
public IPAddress ip;
public StreamReader reader;
public StreamWriter writer;
public UserObject() { }
public UserObject(Socket socket)
{
this.socket = socket;
this.ip = ((IPEndPoint)socket.RemoteEndPoint).Address;
this.reader = new StreamReader(new NetworkStream(socket));
this.writer = new StreamWriter(new NetworkStream(socket));
}
}
Once you've created an object you're happy with, you could either use an ArrayList, or even better would be a List<T> since all the array elements will be the same object type:
Code:
List<UserObject> my_users = new List<UserObject>();