.NET (VB) XML Comments - Code Examples in Summary

1.2k views Asked by At

Does Visual Studio (2017) intellisense support having code examples? I am trying to put the Code elements in the summary xml element for commenting on methods. When I put the Code element in the Summary element, the intellisense doesn't do any of the keyword highlighting, indenting, etc. It's just a plain text.

Is there a way to get the intellisense to display a code sample as it would be displayed in the editor? I have tried using the Example element with Code element outside of the Summary element as suggested by MSDN.

Public Class MyObjectClass

    ''' <summary>
    ''' This method does some stuff.
    ''' <code>Dim i As Integer</code>
    ''' </summary>
    Public Sub MyMethod()
        'Doing some stuff...
    End Sub

End Class

enter image description here

0

There are 0 answers