I am trying to log a method’s parameters by using reflection. I read the earlier question posted about this issue on StackOverflow as well which pointed me to CLR API’s.
Is it possible, someone can point me to the right direction, as to how will I get the values of parameters passed using API?
Basically you can’t in ‘vanilla’ .NET code. Parameters are just local variables, and their values can’t be fetched without delving into the debugger API mentioned in the other thread.
What you may be able to do is use PostSharp to insert the logging code. I’d suggest going that route before looking at the debugging API!