DebuggerDisplayAttribute Behaviour

The DebuggerDisplay attribute has AttributeUsage Inherit=true and AllowMultiple=True.

If a DebuggerDisplay attribute is applied to a base class, but not a derived class, would the debugger attempt to use the inherited attribute when displaying the derived class?

What would happen if multiple DebuggerDisplay attributes were applied to a single entity?

[357 byte] By [KevinDowns] at [2008-1-12]
# 1
There is an article in the May 2005 (vol 20 no 5) issue of MSDN Magazine that talks about this specific thing.

In summary there is property that determines whether an attribute is to be inheritable. In reference to specifying the same attribute multiple times, this usualy is something that the compiler will complain about if it is not legal.

MarcD at 2007-8-21 > top of Msdn Tech,.NET Development,Common Language Runtime...

.NET Development

Site Classified