I am trying to workout a way to programatically create a key for Memcached, based on the method name and parameters. So if I have a method,
string GetName(int param1, int param2);
it would return:
string key = "GetName(1,2)";
I know you can get the MethodBase using reflection, but how do I get the parameters values in the string, not the parameter types?
You can't get method parameter values from reflection. You'd have to use the debugging/profiling API. You can get the parameter names and types, but not the parameters themselves. Sorry...