Possible Duplicate:
VB.NET Function Return
If I have a function that returns a boolean, what is the difference between:
Return False
and
Function = False
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Return Falseimmediately exits the function so nothing further is executed.Setting
FunctionName = Falseallows the return value to be assigned again before the function exits.Personally I’d stick with
Returnas it’s much clearer what you’re trying to do. Assigning to the function name is left over from VB6.