共用方式為


<returns> (Visual Basic)

指定屬性或函式的傳回值。

語法

<returns>description</returns>  

參數

description
傳回值的描述。

備註

<returns>使用方法宣告批註中的標記來描述傳回值。

使用 -doc 編譯以處理檔案的檔批注。

範例

此範例會 <returns> 使用標記來說明函式傳回的內容 DoesRecordExist

''' <param name="id">The ID of the record to update.</param>
''' <remarks>Updates the record <paramref name="id"/>.
''' <para>Use <see cref="DoesRecordExist"/> to verify that
''' the record exists before calling this method.</para>
''' </remarks>
Public Sub UpdateRecord(ByVal id As Integer)
    ' Code goes here.
End Sub
''' <param name="id">The ID of the record to check.</param>
''' <returns><c>True</c> if <paramref name="id"/> exists,
''' <c>False</c> otherwise.</returns>
''' <remarks><seealso cref="UpdateRecord"/></remarks>
Public Function DoesRecordExist(ByVal id As Integer) As Boolean
    ' Code goes here.
End Function

另請參閱