>But, why am I forced to use a function in order to return a value:
Because you can only use a function in VB.Net to return a value - that's just the way it is. However, this kind of distinction is not an issue in C#.
FWIW, even in VFP, despite the fact that you can return a value from a procedure, the general idea was that functions return values and procedures just execute code where a return value is not the issue. VB.Net actually does what it is supposed to do in this regard.
>Whenever I add a new function to a VB.NET code inside my form, I always end up with something like this:
>
>
> Private Sub MyFunction()
>
> End Sub
>
>
>But, why am I forced to use a function in order to return a value:
>
>
> Private Function GetUrl(ByVal tcUrl As String) As String
> Dim lcMergedText As String
>
> Return lcMergedText
> End Function
>
>
>This syntax confuses me. I just don't understand why we can't use the Sub approach when returning a value.
-=Gary