Let's say I have two classes.
School & Students and I want to make a school object that holds many student objects. What will the code look like?
Thanks!
Collection Class
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

patrickRank #4,458 · 342 reputationPosted Jun 10, 2009, 6:19 AM EDT
then to add:
sList.add(someStudent);
patrickRank #4,458 · 342 reputationPosted Jun 10, 2009, 6:23 AM EDT
Just add the list object to the school class like you would any variable
Shane Poppleton5 reputationPosted Jun 10, 2009, 9:30 PM EDT
class school { List list; public List Students { get { return list; } set { list = value; } } public school() { list = new List(); } }