0

When using VB.Net, I can use the ''' sequence of characters at the top of a Function, Sub, Class, Enum.... Each of these types has a unique set of XML elements automatically populated when using '''. For example:

''' <summary>
''' 
''' </summary>
''' <returns></returns>
Private ReadOnly Property _noResultsFound As String

''' <summary>
''' 
''' </summary>
''' <param name="stressRatio"></param>
''' <param name="stressSum"></param>
''' <param name="stressLoc"></param>
''' <param name="describeLoad"></param>
Private Shared Sub CheckCritical(stressRatio As Double,
                         ByRef stressSum As ClassStressSummaryPoint,
                         stressLoc As ClassMemberForStress,
                         describeLoad As ClassDescribeLoading)
End Sub

Is there a way to modify the template for this XML generation to include other elements? For example, I'd like to add a element in which I can document revisions for a given item.

''' <summary>
''' 
''' </summary>
''' <param name="stressRatio"></param>
''' <param name="stressSum"></param>
''' <param name="stressLoc"></param>
''' <param name="describeLoad"></param>
''' <history>
''' 2022 Sep 15 - AMP - Initial Creation of Method
''' 2022 Oct 10 - ELD - Updated unit conversion to use Double extension .MetersToInches
''' </history>
Private Shared Sub CheckCritical(stressRatio As Double,
                         ByRef stressSum As ClassStressSummaryPoint,
                         stressLoc As ClassMemberForStress,
                         describeLoad As ClassDescribeLoading)
Andy
  • 3
  • 4
  • 1
    There was some talk about this in the past: https://stackoverflow.com/questions/10656676/can-i-change-the-xml-comment-template-in-visual-studio. See this SO question which points to this article https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/may/documenting-your-code-with-xml-comments (see customizing XML comments). I am not sure if it will work with recent VS versions or if there is another way. – Velja Radenkovic Oct 10 '22 at 11:18

0 Answers0