M
mp
If one has a class.
To use it some condition should be true.
So i give it an Init method of type boolean
being new to dotnet not sure how to code it?
Function Init() As Boolean
If ConditionNotMet Then
Exit Function <---would this leave the function before returning
false?
Return False
Else
....
Return True
End If
End Function
or
Function Init() As Boolean
If ConditionNotMet Then
Return False<---should you return value before leave the function?
Exit Function
Else
....
Return True
End If
End Function
also in VB6 the "return" syntax used to be
Init = True
am i correct in thinking it is now
Return True
I noticed i had used the old version somewhere and it still compiled...are
the two interchangable?
Thanks
mark
To use it some condition should be true.
So i give it an Init method of type boolean
being new to dotnet not sure how to code it?
Function Init() As Boolean
If ConditionNotMet Then
Exit Function <---would this leave the function before returning
false?
Return False
Else
....
Return True
End If
End Function
or
Function Init() As Boolean
If ConditionNotMet Then
Return False<---should you return value before leave the function?
Exit Function
Else
....
Return True
End If
End Function
also in VB6 the "return" syntax used to be
Init = True
am i correct in thinking it is now
Return True
I noticed i had used the old version somewhere and it still compiled...are
the two interchangable?
Thanks
mark