Friday, November 28, 2008

Customize debug view

I made a wrapper class for some other class. And every time when I wanted to see in debugger what does it wraps I had to view the class members and theirs members just to view that name of the wrapped class is something.

In order automatically to view important members of class and help you to fast identify object put this attribute to class:

[DebuggerDisplay("Name = {name}")]

...where "name" is class property or field name.

No comments: