Skip navigation.
Home

Iterate over Enum Members

When you are dealing with a variable that can have one of a defined set of values, it is preferable to use an Enum to define those values, rather than use a primitive datatype like Integer.

This tip isn't about why Enums are better, it is about how to iterate over the range of valid values for the Enum. For example, given the following Enum:

    Private Enum FileOperation
        Open = 1
        Close = 2
        Save = 3
        SaveAs = 4
        Copy = 5
        Move = 6
        Delete = 7
    End Enum

Subversion Permissions

WARNING
This tip involves editing your Subversion repository .access file.
If your repository is hosted with Dreamhost there is a problem with this.

Whenever you use the Dreamhost Panel to create a new user it will wipe your
work from the .access file, and overwrite it with a default file that gives full
permission to everyone.

If you need to edit your .access file then keep a backup so that when you create new
users you can restore your version of the file.

Subversion Per Directory Access

The Specification Design Pattern

I've written a four part series on the Specification Design pattern. The four articles are available now on codeproject.com. The articles take you from an introduction to the pattern to a simple VB.Net implementation and finaly to a reusable Specification class that uses inheritence, generics and Operator Overloading.

Attributes and Value Objects article on eggheadcafe

My article on modelling attributes using value objects is available on eggheadcafe. It'll take you though the process of modelling a Temperature attribute, starting with a naive implementation and working towards a fully fledged value object.

See Here

VB6 Collections Article

This is another old article, but it may be useful to someone. It originally appeared in The Visual Basic Programmer's Journal, July 2001, Volume 11, Issue 7.

See Here

Visitor Design Pattern Article

This is going back a bit, but my article on the Visitor Design Pattern (in VB6) is available on MSDN. It was originally published in The Visual Basic Programmer's Journal, March 2001, Volume 11, Issue 3.
See Here

Syndicate content