Jump to content

Recommended Posts

Posted

I'm trying to come up with some code that I can use to add INFO level tracing to my DAL and BL code.* So far, I'm able to obtain plenty of metadata about the functions, but not the actual parameter values:

 

StringBuilder sb = newStringBuilder();

sb.Append(System.Reflection.MethodBase.GetCurrentMethod());

ParameterInfo [] ParameterInfos = System.Reflection.MethodBase.GetCurrentMethod().GetParameters();

foreach (ParameterInfo ParameterInfo in ParameterInfos)

sb.Append(" ").Append(ParameterInfo.Name).Append(" {").Append(ParameterInfo).Append("}");

TraceLog.Info(sb.ToString());

 

 

 

this will output the metadata about the parameters, but not the actual values.* For example, it will show me that the value is an Int32, but not that the value is 3.

 

I know that this is doable, but I can't seem to pick the right combination of words, punctuation, and secret masonic dances required to get Google to return a clue.

 

Any clues?

 

Edit: oh, and what the heck is the 'code' tag on C9 again?

 

More...

 

View All Our Microsft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...