G
Guest
Here is a method that calls a static GetInfo() method on the MyObject class.
public void MethodName(string param1, int param2)
{
MyObject.GetInfo();
}
Is there any way for the GetInfo() method to find out the name and
parameters of the method it was called from?
For example
public static void GetInfo()
{
// Is there some query I can make that would return the name 'MethodName'
// and the names of its parameters 'param1' and 'param2' and their values?
}
Can this be done with System.Reflection?
Joe
public void MethodName(string param1, int param2)
{
MyObject.GetInfo();
}
Is there any way for the GetInfo() method to find out the name and
parameters of the method it was called from?
For example
public static void GetInfo()
{
// Is there some query I can make that would return the name 'MethodName'
// and the names of its parameters 'param1' and 'param2' and their values?
}
Can this be done with System.Reflection?
Joe