Say I have a method:
public void SomeMethod(String p1, String p2, int p3) { #if DEBUG object[] args = GetArguments(); LogParamaters(args); #endi
There's some functionality with the dynamic type system that can do it, but then your class needs to inherit from the dynamic base classes