Something
public text v1 · immutablepublic class AddrBook
{
// internal variable to hold the bookList
private ArrayList bookList;
// outsiders may access the list with the Book property
public ArrayList Book
{
get { return bookList; }
}
public AddrBook(Addr addr)
{
bookList = new ArrayList();
bookList.Add(addr);
}
// internally we reference bookList, but others would use Book, so:
AddrBook ab = new AddrBook();
ab.Book.Add(addr);