vb.net-study-05 to attach importance to write a comment -vb.net process and procedures -Sub Function Function Comment

Disclaimer: This article is a blogger original article, by allowing the bloggers are free to share, try not to be used for commercial purposes. https://blog.csdn.net/matrixbbs/article/details/91489603

Note 1 GENERATION

The beginning of the process and Function Function Code Sub continuous input line English semicolon 3 '' ', it will automatically add comments.
Method
  1. First write code
  2. On the head of the code knock '' '(single quote even knock button 3')
  3. automatic generation, the annotation content can be simply filled inside

Or
Here Insert Picture Description

2 comments general format

''' <summary>
''' 这里写方法名称或作用
''' </summary>
''' <param name="str">这里写参数说明</param>
Public Sub StuEvaluateCustomEvent(ByVal str As String) '定义触发事件的方法
	RaiseEvent CustomEvent(str) '触发事件
End Sub

''' <summary>
''' 这里写函数名称或作用
''' </summary>
''' <param name="str">这里写参数说明</param>
''' <param name="int">这里写参数说明</param>
''' <returns>这里写对返回值的说明</returns>
Public Function StuEvaluate(ByVal str As String, ByVal int As Integer) As Boolean
	Return True
End Function

3 Comment Result

    ''' <summary>
    ''' 求和函数
    ''' </summary>
    ''' <param name="num1">被加数</param>
    ''' <param name="num2">加数</param>
    ''' <returns>和值</returns>
    ''' <remarks> 此部分支持xml格式的描述说明
    ''' </remarks>
    Private Function getSum(ByVal num1 As Integer, ByVal num2 As Integer) As Integer
        Dim sum As Integer
        sum = num1 + num2
        Return sum
    End Function

Guess you like

Origin blog.csdn.net/matrixbbs/article/details/91489603