Search code examples
c#newlinesummary

NewLine in object summary


Greetings

When setting a summary for a property / field / method etc.. is it possible to have a newline in it?

/// <summary>
/// This is line 1
/// This is line 2
/// </summary>
public bool TestLine { get; set; }

When I set this it shows as on mouse over:

bool TestLine
This is line 1 This is line 2

But I want it to show as:

bool TestLine
This is line 1 
This is line 2

I've tried using \n but that doesn't work. Is there any way to get this done?


Solution

  • You want to use some thing like this

    /// <summary> 
    /// Your Main comment 
    /// <para>This is line 1</para> 
    /// <para>This is line 2</para> 
    /// </summary> 
    public bool TestLine { get; set; }