DebuggerDisplay on generic class

前端 未结 3 1005
灰色年华
灰色年华 2021-02-19 06:27

I have a problem applying the DebuggerDisplay attribute on a generic class:

[DebuggerDisplay(\"--foo--\")]
class Foo
{
}

[DebuggerDisplay(\"Bar: {t         


        
3条回答
  •  礼貌的吻别
    2021-02-19 07:04

    You can use [DebuggerDisplay("Bar<{typeof(T).Name}>,nq}")]//nq - no quotes.

    You also can use these practices: DebuggerDisplay attribute best practices

提交回复
热议问题