How to access parameters values by reflection?
Index
‹
.NET Development
‹
.NET Base Class Library
Author
Message
jmnobre
Posted: .NET Base Class Library, How to access parameters values by reflection?
Top
Hi!
Imagine the following scenario:
public void foo( int i )
{
...
}
public void foo2( )
{
...
}
Assuming that foo calls other methods and somewhere in the call stack, foo2 is called.
Analysing the stack frame, I can figure out that foo has been called... and i can inclusive get its signature... but, can I extract the value of "i"
If so, how
I'm using the framework 1.1
Thanks in advance
jmn
.NET Development3
Mattias Sjogren
Posted: .NET Base Class Library, How to access parameters values by reflection?
Top
No you can't.
TalhaAziz
Posted: .NET Base Class Library, How to access parameters values by reflection?
Top
try this out ....
Profiling API
... its says under the "Describing and Decoding Function Arguments" heading
Quote:
"Now that you have callbacks for the function at the point it is being entered and exited, you can examine arguments and return values."
i had a similar problem ... i havnt tried this API yet but i guess this will solve the problem
Mattias Sjogren is right ... you cant do this using reflection
Index
‹
.NET Development
‹
.NET Base Class Library