First off, constants values should not change. E.g. I notice in your code
that MaxAge is sometimes 18 and sometimes 14. That's not a constant --
that's a variable. So what you're doing is correct.
For actual constants, you should instead use
Public Const MaxAge as Integer = 18
Second, you're setting MaxAge (which is an integer) to "18". If there are
quotes around a value, that's a string. It'll work in VB, but only because
VB is so forgiving. You should read up on data types to make sure you don't
run into issues.
Lastly, you're adding boolean variables into your RequiredProperties
collection, not objects. So I don't know why you're checking for objects in
there. Maybe you should instead use a Dictionary object to store your
properties, then you can check by key whether something is added or not.

Signature
Ben Strackany
www.developmentnow.com
Dear Ben,
Thank you for your response.
> First off, constants values should not change. E.g. I notice in your code
> that MaxAge is sometimes 18 and sometimes 14. That's not a constant --
> that's a variable. So what you're doing is correct.
> For actual constants, you should instead use
Thank you for the clarification. I am clear on the difference - however
the example here appears to fall into the middle. It is a constant in that
across the class in question it is effectively constant - the effect I want
is to define a constant in the base class and set it's value in the
inherited classes.
> Second, you're setting MaxAge (which is an integer) to "18". If there are
> quotes around a value, that's a string. It'll work in VB, but only because
> VB is so forgiving. You should read up on data types to make sure you don't
> run into issues.
It's a silly error - the code given was supposed to just illustrate a
point - I wrote it in OE... I didn't however know that VB was that
forgiving - how distinctly unhelpful of it.
> Lastly, you're adding boolean variables into your RequiredProperties
> collection, not objects. So I don't know why you're checking for objects in
> there. Maybe you should instead use a Dictionary object to store your
> properties, then you can check by key whether something is added or not.
Again I think I mis-communicated. RequiredProperties could include
references to anything - not just booleans. But it is a valid point - I can
add a pointer to a string into the collection but not a pointer to an
underlying data type - how irratating.