views:

21

answers:

1

Hi,

I'm writing a .dll in Visual Basic. When writing code in Visual Studio if I do something like

Console.WriteLine(

it will pop up a tooltip with a bit of documentation for the function. Is it possible to write something in my function/sub that would provide that information to Visual Studio?

Thanks

+2  A: 

Yeah, sure! Something like:

''' <summary>
''' Comment for method
''' </summary>
''' <param name="Parameter">Comment for the parameter "Parameter"</param>
''' <remarks></remarks>
Sub Test(ByVal Parameter As Integer)

End Sub

The XML documentatin block should be prepended with three comment (single quote) characters.

You can view a list of common documentation XML tags here.

Bonus point is that the compiler can extract an XML file and put it alongside your assembly which documentation generator tools (like Sandcastle, NDoc) can use to generate formatted help files with your API documentation automatically.

Mehrdad Afshari
Excellent! Works perfectly, exactly what I was looking for thanks!
Wayne Werner