<반환>(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

참고 항목