The Setting Class

I haven't pulled any punches with the Setting class. This is an example of "real" code that you can put to work in real applications. You're going to use all sorts of techniques that I've covered so far including classes (obviously), enumerations, and error handling. Anyway, because this is production code, or code you can use for "real" applications, it's meant to be robust yet readable. Consequently, this class is longer than other code listings you've seen so far.

I debated the merits of presenting this class piece by piece versus showing it all at once and decided on the latter. From my own experience reading other programming books, I know that I always seem to forget something when I'm trying to put together long passages of code that are presented piecemeal.

As you browse over the code in Listing 12.1, notice that most of the Property Let procedures are implemented nearly identically. Likewise, most of the Property Get procedures are very similar.

0 0

Post a comment