I was trying to do something like:
static void Main(string[] args)
{
string[] clients = new clients[0];
createClients(clients);
//do something with clients
}
static void CreateClients(string[] clients)
{
//ask how many clients
int c = Convert.ToInt32(Console.ReadLine());
clients = new string[c];
}
But when I go out of the CreateClients procedure the 'clients' array was not modified, am I missing something? I thought arrays were passed always as reference
Thanks