I want to simulate a soldier attend simulation.
I have two arrays. First one is string[] soldier, which consists of soldier names. Second one is string[] cities, consisting of the cities to be attended.
There are two cases:
1. number of soldiers
I have developed the following method:
for (int i = 0; i
lstresult.Items.Add(askerler[i] + "-" + sehirler[i]);
}
2. number of soldiers>number of cities.
I could not be able to use the same method.
please help.
NOTE: each soldier must be attended to different cities, if avaiable.

VulpesPosted Oct 29, 2012, 1:01 PM
The following code should work in either case:
Turkalp KucurPosted Oct 29, 2012, 1:20 PM
Thank you.