Ugh, I loathe working with VB for money reasons, unfortunately I have to maintain the company’s existing all crappy software.  So, I’m coding away adding in the latest bug fix or feature request when VB’s fantastic IDE tells me what I’ve done is wrong…

Take a look at the below GIMP’d screenshot (I’ve highlighted the points of interest).  As you can see VB’s IDE has complained that I have declared duplicate variable names in the same scope.  I know I have declared duplicate variables names, that is what I was intending to do, consistency and all that.  However, each declaration is under a different branch of the parent conditional, which should have a scope of it’s own.  Apparently VB has it’s own way of doing things.  Yes, I could pull the declaration out of the conditional and have one declaration but I was hoping to be less intensive on the heap by declaring them only when they are needed (efficiency and all that).

VB's excellent scope analysis

 Anyway, this is just one irritating feature of VB that causes me so much pain :( </rant>