Hi TS
Post some code, there should be no reason for it to compile.
Internally you can manage an array list, but you can make your member
property to return a typed array if you want
Example:
private ArrayList alEmployees = new ArrayList(20) ;
Public Employee[] Employees {
get {
return (Employee[])alEmployees.ToArray
(typeof(Employee))
}
set {
alEmployees.clear();
alEmployees.AddRange(vaue);
}
}
This is assuming you do want a typed array, otherwise using the arraylist
should do the trick
private ArrayList alEmployees = new ArrayList(20) ;
Public ArrayList Employees {
get {
return this.alEmployees; }
set {
this.alEmployees = value ;
}
}
Give some code excample if this is not quite what you had in mind
Henk
"TS" <ma*********@311.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello, I am trying to have a member of a class declared as an arrayList to
have get & set property accessors, but I can't get it to compile. This
member variable can't be a simple array because I don't know the number of
items in the collection. I need to be able to add more items at run time.
Any solutions?
thanks