Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (36 sloc) 1.35 KB

Generate property for DebuggerDisplay attribute

Property Value
Id RR0204
Title Generate property for DebuggerDisplay attribute
Syntax DebuggerDisplay attribute
Enabled by Default

Usage

Before

[DebuggerDisplay("A: {A} B: {B}")]
public class Foo
{
    public string A { get; }
    public string B { get; }
}

After

DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Foo
{
    public string A { get; }
    public string B { get; }

    [DebuggerBrowsable(DebuggerBrowsableState.Never)]
    private string DebuggerDisplay
    {
        get { return $"A: {A} B: {B}"; }
    }
}

See Also

(Generated with DotMarkdown)