From: Billy on
Anybody know how I can set environment in C# so that when you will
press "-" sign in front XML doc comment (///) it will collapse like in
VB.NET, With that i mean you will see only summary text and not only
<summary> tag.

Let me show example and results in both languages.

In VB.NET:
''' <summary>
''' Add two whole numbers
''' </summary>
''' <param name="intNr1">First number</param>
''' <param name="intNr2">Second number</param>
''' <returns></returns>
''' <remarks></remarks>
Function AddNumbers(ByVal intNr1 As Integer, ByVal intNr2 As
Integer) As Integer
Return intNr1 + intNr2
End Function

when I press "-" to collapse comment I get nicely only this row above
procedure:

Add two whole numbers
Function AddNumbers(ByVal intNr1 As Integer, ByVal intNr2 As Integer)
As Integer
Return intNr1 + intNr2
End Function

But for same procedure in C#:

/// <summary>
/// Add two whole numbers
/// </summary>
/// <param name="intNr1">First number</param>
/// <param name="intNr2">Second number</param>
/// <returns></returns>
/// <remarks></remarks>
public int AddNumbers(int intNr1, int intNr2)
{
return intNr1 + intNr2;
}

when I press "-" next to the comment I get this:

/// <summary> ...
public int AddNumbers(int intNr1, int intNr2)
{
return intNr1 + intNr2;
}

So what is the point of collapsing of such comment in C# if you cannot
see at the top what is the most important when you collapse comment?

So my quesitons is: How to see same summary also in C# like it is in
VB.NET?
From: Jeff Johnson on
"Billy" <abil2y(a)yahoo.com> wrote in message
news:01869f84-5301-4c9d-8ff6-b5af1cf15c94(a)x21g2000yqa.googlegroups.com...

> So my quesitons is: How to see same summary also in C# like it is in
> VB.NET?

You can't. The C# and VB.NET editors are different; it's not just the
languages. In most situations I think the C# experience is superior, but
there are cases where VB.NET has an edge, and this is one of them.


From: Billy on
On Jul 1, 4:18 pm, "Jeff Johnson" <i....(a)enough.spam> wrote:
> "Billy" <abi...(a)yahoo.com> wrote in message
>
> news:01869f84-5301-4c9d-8ff6-b5af1cf15c94(a)x21g2000yqa.googlegroups.com...
>
> > So my quesitons is: How to see same summary also in C# like it is in
> > VB.NET?
>
> You can't. The C# and VB.NET editors are different; it's not just the
> languages. In most situations I think the C# experience is superior, but
> there are cases where VB.NET has an edge, and this is one of them.

Yes, I completly agree that C# is more intuitive and more natural, but
that flaw should be implemented by design already.
From: Adam Clauss on
On 7/1/2010 5:57 AM, Billy wrote:
> Anybody know how I can set environment in C# so that when you will
> press "-" sign in front XML doc comment (///) it will collapse like in
> VB.NET, With that i mean you will see only summary text and not only
> <summary> tag.
>
> Let me show example and results in both languages.
>
> In VB.NET:
> '''<summary>
> ''' Add two whole numbers
> '''</summary>
> '''<param name="intNr1">First number</param>
> '''<param name="intNr2">Second number</param>
> '''<returns></returns>
> '''<remarks></remarks>
> Function AddNumbers(ByVal intNr1 As Integer, ByVal intNr2 As
> Integer) As Integer
> Return intNr1 + intNr2
> End Function
>
> when I press "-" to collapse comment I get nicely only this row above
> procedure:
>
> Add two whole numbers
> Function AddNumbers(ByVal intNr1 As Integer, ByVal intNr2 As Integer)
> As Integer
> Return intNr1 + intNr2
> End Function
>
> But for same procedure in C#:
>
> ///<summary>
> /// Add two whole numbers
> ///</summary>
> ///<param name="intNr1">First number</param>
> ///<param name="intNr2">Second number</param>
> ///<returns></returns>
> ///<remarks></remarks>
> public int AddNumbers(int intNr1, int intNr2)
> {
> return intNr1 + intNr2;
> }
>
> when I press "-" next to the comment I get this:
>
> ///<summary> ...
> public int AddNumbers(int intNr1, int intNr2)
> {
> return intNr1 + intNr2;
> }
>
> So what is the point of collapsing of such comment in C# if you cannot
> see at the top what is the most important when you collapse comment?
>
> So my quesitons is: How to see same summary also in C# like it is in
> VB.NET?
>
If you modify the comment format slightly, it will give you a result
closer to what you want. That is, move the <summary> tags and content
onto a single line:

///<summary>Add two whole numbers</summary>
///<param name="intNr1">First number</param>
///<param name="intNr2">Second number</param>
///<returns></returns>
///<remarks></remarks>
public int AddNumbers(int intNr1, int intNr2)
{
return intNr1 + intNr2;
}

Not necessarily the "standard" way I see C# docs written, but it gives
the result you are looking for.

-Adam