View Single Post
Old June 11th, 2003, 01:37 PM
Jstmehr4u3 Jstmehr4u3 is offline
Authorized User
Join Date: Jun 2003
Location: Livermore, CA, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Well, I just used Name for instance.
I have a class that sends messages. Each message has its own set of rules for each property. IsRequired, MaxLength, DataType.

I want the application to be able to test the data going into the class before it gets there, based on the rules (or properties) for each property.
For instance:
dim myClass as new Transactions.NewMessage
if MyClass.MessageBody.IsRequired then
  if len(MyVariableGoingToClass) <> MyClass.MessageBody.MaxLength then error
end if

Some other properties may have a SubRoutine associated to that property, Like:

So when you look at the entire hierarchy, you see:

How would I do that?