Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why forced to use Function instead of Sub
Message
De
31/12/2004 16:36:11
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Why forced to use Function instead of Sub
Divers
Thread ID:
00973583
Message ID:
00973583
Vues:
64
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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform