Is there a way to programatically determine the parameters passed to a procedure i.e. given:
void Proc1( string cVarName )
{
...determine that one parameter named cVarName is here and it's type is string and then say display it.
}
As an FYI, I was curious if I could write a generic function for CodeSite to easily dump the incoming parameters of a given procedure.
Regards,
Nick H

Programtically determine paramaters
Astro_4
You could write a generic function that would take the class instance (this) and the function name as a parmeter to figure out which parameters are there via Reflection. But that does not help with dumping the values from inside the procedure as there us afaik no way to determine which parameter is mapped to which local variable inside the function. Guess the little less generic function, faster and more useful function would be something like this:
static class Dump{
static void DumpFunction(string name, params object[] p)
{
// dump whereever you want it...
}
}
...
void Method1(string string1, int int1, ...)
{
Dump.DumpFunction("Method1", string1, int1, ...);
}
tiltstern