How can I trace a variable at runtime in C#?

前端 未结 5 1787
余生分开走
余生分开走 2020-12-18 05:43

How can I track a variable\'s values as they change, at runtime, in C#? I\'m interested in the same functionality that the debugger provides when I\'m tracing a variable thr

5条回答
  •  情深已故
    2020-12-18 06:23

    To add to what Marc said, if you want to do this for lots of properties and methods you might want to check out aspect oriented programming techniques, and libraries such as PostSharp.

    http://www.sharpcrafters.com/postsharp

提交回复
热议问题