Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Having a date as optional parameter
Message
De
22/04/2006 15:13:16
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Having a date as optional parameter
Divers
Thread ID:
01115718
Message ID:
01115718
Vues:
57
I have this function:
        ' Ajoute un cookie
        ' expC1 Cookie
        ' expC2 Value
        ' expC3 Path
        ' expC4 Expiration
        Public Function AddCookie(ByVal tcCookie As String, ByVal tcValue As String, _
         Optional ByVal tcPath As String = "/", _
         Optional ByVal tdExpiration As Date = Date.Now) As Boolean
            Dim loCookie As New System.Web.HttpCookie(tcCookie)
            loCookie.Value = tcValue
            loCookie.Expires = tdExpiration
            loCookie.Path = tcPath
            oApp.oCookie.Add(loCookie)
        End Function
The optional parameter tdExpiration should have a default value. However, it cannot accept what I did. It has to be a constant. How can I define it?
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