Reply to thread

I know,I tried that before, the code compiled but  didnt work.


I actually have solved the problem by using a Collections class.


But i wud still like to know how to create an array of the objects of a class which requires a parameter in the constructor.



Here is my solution , just the main part


public class ClientCollection : System.Collections.CollectionBase

{

   public ClientCollection(Policy MyPolicy)

  {


    for(int i=0; i< MyPolicy.PeopleCount;i++)

   {

     CClient myClient =  new CClient(MyPolicy);

     this.Add(myClient);

     myClient = null;

   }

 }

......................


Back
Top