that's not what i meant...
what i need is a way to get the real arguments of the method that called another method in runtime.
ex. if i have something like this:
[code]
public static void CallerFunc(int a, int b, string c)
{
SpoofParams();
}
[code]
i want the SpoofParams() func. to reflect the params passed to CallerFunc, not the metadata that you get reflecting the type, but the actual variables.
It should work generally anywhere, so i can't use reflection to get the method
signature by name....
I'm not exactly sure what you mean. Perhaps you mean, how do you pass the reference of an argument to the method? For example:
-
-
-
///this function would return 12;
-
public int add()
-
{
-
int a1 = 1;
-
int a2 = 2;
-
-
Change(out a1,out a2);
-
-
return a1+a2;
-
-
}
-
-
public void Change(out int a,out int b)
-
{
-
a = 5;
-
b=7;
-
}
-
-
If that's what you're looking for, please search google for how to use the "ref" and "out" keywords. If not, please clarify.
Hope I've helped.