Array of a specific type
Posted on 2006-10-21
I am making an application that receives various blocks of information from a server application. One type of information that my application will need to receive, process and display (in a list box) is the name of other users who are connected to the server.
The information is sent to my application through a socket connection and blocks of data are sent as applicable....as in if someone new connects then a new block with those details is sent.
So I know I need to use an array of some kind in order to store this information. At first the array will be empty because the application needs to receive a data block with a new user's details. So lets say the application gets a new user....I will clearly need to redim the array (preserving current data) to enable me to add the new data block. That's fine and easy - no problems. The datablock contains the user's name and their connected name (callsign if you will). Once I have this information my program requests more information and this is sent in a different datablock. In total the information I need to store, for each user, is:
* Sector File
All the above are string values.
Now my question is how do I store that specific information in an array? I could define a user type but how do I get that to work with the array? I want to be able to display the data in the array on a column based list box if applicable. I also need to be able to easily remove users from the array (by callsign) if they disconnect.
Any help on how I can best achieve the above would be much appreciated.