NewLine in object summary

Theun Arbeider picture Theun Arbeider · May 19, 2011 · Viewed 39.1k times · Source

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?

Answer

YetAnotherUser picture YetAnotherUser · May 19, 2011

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; }