View Single Post
  #4 (permalink)  
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
Default

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:
MyClass.MessageBody.Build()

So when you look at the entire hierarchy, you see:
Transactions.NewMessage.MessageBody.Build()

How would I do that?
Reply With Quote