Hello,
Need an easy way to Display the property values of an object (dynamically)
ie I need to show the values of an Object in a rich text box.
Background : We have a form, with a rich text box, where we want to display
the values of any given object (say customer, order etc). We declared (Dim
Obj as New Object) and assigned our application object. Now we want to print
as Text (string) the values of Obj.
Issue : We tried using Obj.ToString (similar to java), but here the default
implementation is to display the Name/type of the object rather than the
values. Is there any way we can get this to work without implementing a
toString in Each of our classes. (We really want to avoid this as there are
quite a few classes)
Is there any way to loop thro the properties of a class and print them /or
any other solution/ideas
For example:
I've created an Object "obj"
the "obj" contains the following properties:
name
Description
.....
.....
.....
Here i need to get the values of the Properties(Attributes) in a rich text
box..
but i dont want to get the values as
obj.name
obj.Descriprion
....
....
and so on.
I want it in a single or simple code, no matter how many properties are there
--
Peter...