I hadn't seen this post when I answered the one in the reflection thread, there is an answer there to that question, but also if you do:
you will get a toString representation of the class which lists the global variables.
You can't assign it to a string directly, but you can use reflection to get the toString for the class.
As a sub in the class:
Sub ToString As String
Dim R As Reflector
R.Target=Me
Return R.RunMethod("toString")
End Sub
Then you can slice that as you wish.
Or you can get a list of the variables relevant to the class through reflection as:
Dim c As myclass
Dim r As Reflector
r.Target=c
r.Target=r.RunMethod("getClass")
Dim Fields() As Object = r.RunMethod("getDeclaredFields") 'or one field as r.Target= r.RunMethod2("getDeclaredField","_v_i","java.lang.String")
For Each Field As Object In Fields
r.Target=Field
Log(Field&" "&r.RunMethod("getType"))
Next
You'll need to filter out those you don't want or you can get one field at a time by name (see comments).
You'll need the reference for
Field, and maybe
class if you want to follow it through and make changes.