I need help with some code to get the propeties of an object dynamically.

What i need to do is generate a treeview according to the propeties of an object so when i change the class, because the object is instantiated using the class the treeview should change accordingly.

basically this is what i want to do.

Dim PropList() As String = Split(Obj.PropertyList)
Dim I as integer
For I = 0 to Ubound(PropList)
AddTreeViewNode(PropList(I),Ob.Properties(PropList(I))
Next

addTreeViewNode is a method that adds nodes to a treeview. What i need is a way of using something similar to Obj.PropertyList and Ob.Propeties (these don't exist obviously)

Any ideas anybody?