‘*************************************************************************
' * * Module name: Engineering 1-form1
' * * Description: Blue Phoenix design Mall bath Fire Phoenix-Guo Wei | Blue Phoenix-Magic Spirit | Guo Wei-icecept
' * * Created by: Shower Fire Phoenix-Guo Wei
' * * Date: October 19, 2015 21:53:17
' * * Modified by: Shower Fire Phoenix-Guo Wei
' * * Date:
' * * Description: qq:493405998 | \ Wang: icecept
' * * Version: V1.0.0 | Http://blog.sina.com.cn/icecept
‘*************************************************************************
Public Class Form1
Private Sub Form1_Load (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles MyBase.Load
CHECKRETURN1 () ' test result Return True after execution, exit subroutine directly, after statement does not execute
CHECKRETURN2 () ' test result CheckReturn2 = True after execution, continue execution of subsequent statements.
End Sub
' 1==return
Function CheckReturn1 () as Boolean
Return True
MsgBox ("I'm CheckReturn1, I'll do It") ' No execution '
End Function
' 2== function name
Function CheckReturn2 () as Boolean
CHECKRETURN2 = True
MsgBox ("I'm CheckReturn2, I'll do it") ' executed '
End Function
End Class
So it would be better to return the value with return. But for the strict programming, or the function name return value is better, because the function name return value, directly return to write a sentence Exit Function, face return does not have to write, write more cumbersome. Over time habit one but nurturance, it is not good to rectify.
The difference between a test function returning a value with return and returning a value with a function name