- Oct 10, 2000
- 2,689
- 0
- 0
I'm not a vb.net programmer but I have a small task to do that's giving me some problems and was wondering if anyone can provide some help.
I have a class that retrieves data from a database. The data gets stored in the class's data fields, but they are not exposed. Adding the class to a watch list shows the data fields, but they aren't accessible.
Is there any way to retrieve the data field by using some tricks?
For example, the code goes something like:
Dim obj as widget
Dim color as string
color = obj.Foreground 'invalid and will not compile because Foreground isn't available.
However, if obj is added to the watch list, Foreground will show up and contains "Red"
Edit: Forgot to mention that the class is part of a compiled DLL, which I don't have source code to so I can't just make the data field public.
I have a class that retrieves data from a database. The data gets stored in the class's data fields, but they are not exposed. Adding the class to a watch list shows the data fields, but they aren't accessible.
Is there any way to retrieve the data field by using some tricks?
For example, the code goes something like:
Dim obj as widget
Dim color as string
color = obj.Foreground 'invalid and will not compile because Foreground isn't available.
However, if obj is added to the watch list, Foreground will show up and contains "Red"
Edit: Forgot to mention that the class is part of a compiled DLL, which I don't have source code to so I can't just make the data field public.