IIRC, there is nothing to access parameter *values*. You can get the names through reflection, but not the values. If you want to dump those out you'll need to write code for that.
Hopefully, you've already got parameter validation code that does the initial testing of the parameters to make sure they're within the bounds of your design. That should help clear up a lot of the "garbage in, garbage out" errors. --- Patrick Steele Microsoft .NET MVP http://weblogs.asp.net/psteele/ > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of > Franklin Gray > Sent: Thursday, August 25, 2005 11:45 AM > To: [email protected] > Subject: Re: [ADVANCED-DOTNET] Writing code for Debugging > > > Ok....now...how about the part to write. It's been a lot > time but I vaguely remember coming across something that > could access parameters of a function. If I could build a > function to call at the beginning of each function and it > would check to see if the trace was turned on and if so it > would loop through all the parameters of the calling function > (the one I want to log the parameter values) then that would > save a lot of typing and centralize the process. Anybody > know of such a thing? It's been so long I don't even > remember what to search for. > > The reason I want to log parameters is because though my > years of work, I've found that to find a bug, the parameters > to a function is the second best piece of information, first > being the line of the error and the error description which > of course is easy to retrieve. > > =================================== > This list is hosted by DevelopMentorR http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
