C
Cezar
Hi,
For non static fields, FieldInfo's GetValue needs an instance of a class
that inherits or declares the field.
What I do is that I create an instance of the class that defines the field
using
Object instObj = Activator.CreateInstance(cl);
but now I need to get the value of the field from the current instance of
the class in the "already running" application.
Kind of what the debugger does when it shows the values
for fields, params etc as it runs the application.
I looked at RuntimeFieldHandle. GetHashCode returns the code of an
instance. Can I use this to find the running instance or I'm looking
in the wrong direction?
Any idea how can I get the class'/method/field current instance
(suppose that the application is already running)
I hope it makes sense what I said...
Thank you
Cezar
For non static fields, FieldInfo's GetValue needs an instance of a class
that inherits or declares the field.
What I do is that I create an instance of the class that defines the field
using
Object instObj = Activator.CreateInstance(cl);
but now I need to get the value of the field from the current instance of
the class in the "already running" application.
Kind of what the debugger does when it shows the values
for fields, params etc as it runs the application.
I looked at RuntimeFieldHandle. GetHashCode returns the code of an
instance. Can I use this to find the running instance or I'm looking
in the wrong direction?
Any idea how can I get the class'/method/field current instance
(suppose that the application is already running)
I hope it makes sense what I said...
Thank you
Cezar