All pastes #200245 Raw Edit

Something

public text v1 · immutable
#200245 ·published 2006-10-13 01:31 UTC
rendered paste body
public 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);