G
Guest
I have a class that I would like to be able to loop through its properties and populate the value of the one I am searching for, in code
Example
The class has 1 read-only integer (A), 2 integers (B, D) and 2 strings (C, E
What I need to be able to do is call a function similar to the one below
Dim c as Clas
UpdateClass(c, "C", "Some String"
UpdateClass(c, "B", 12
Function UpdateClass(class as Object, strPropertyName as string, NewValue as object
For each property in class propertie
If property is not read-only the
If the property.name = strPropertyName the
propery.value = NewValu
Does this make sense? Is it possible
Any help will be much appreciated
Chris.
Example
The class has 1 read-only integer (A), 2 integers (B, D) and 2 strings (C, E
What I need to be able to do is call a function similar to the one below
Dim c as Clas
UpdateClass(c, "C", "Some String"
UpdateClass(c, "B", 12
Function UpdateClass(class as Object, strPropertyName as string, NewValue as object
For each property in class propertie
If property is not read-only the
If the property.name = strPropertyName the
propery.value = NewValu
Does this make sense? Is it possible
Any help will be much appreciated
Chris.