Using XML Documentation in VB .NET 2.0

Until now, direct source code documentation was reserved for C# developers.

From now on, code comment functionality is supported directly in VB.Net 2.0.

That's really cool !

The comments have to start with the familiar comment character (') followed by an @ symbol to make sure that the compiler will recognize them.

Imports Microsoft.VisualBasic

'@ <summary>That's my little foo class</summary>
Public Class Foo

   '@ <summary>These methods return the text passed as parameter</summary>
   '@ <param name="Text">Text to be returned</param>
   '@ <returns>Returns the string passed as
      <paramref name="Text"/> parameter</returns>
   Public Function ReturnMyText(ByVal Text As String) As String
      Return Text
   End Function

End Class

4 Comments

  • ACK! NOOOOOOOOO

    The tag should be ''' as implemented by every independent developer who has patched this previously overlooked feature onto VB so far.



    C#'s tag is \\\, VB's should be '''



    Everyone in the world who has dealt with this problem is in aggreement on this one. Please Microsoft, don't make the tag different just for the wake of being different. Geez that would suck to type.

  • Remember this is only on a preview version, maybe this will cahnge in the final release ;-)

  • Thanx for help..but still not cleared which tool to use?

  • Hmmm....this is not working in Web Dev Express. I haven't installed VS 2005 yet. Shouldn't this work in Web Dev Express too? Thanks for any further info.

Comments have been disabled for this content.