Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a class instance as a parameter
Message
 
À
17/04/2006 21:35:02
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01114205
Message ID:
01114244
Vues:
32
I think your problem here is that both methods are Shared.

>Is there a way to pass a class instance as a parameter? From within a class method, I would like to pass the parent object reference as a parameter when I call a function.
>
>The class is designed like this:
>
>
>Imports System.Windows.Forms
>
>Public Class App
>
>    Public Function Initialize() As Boolean
>    End Function
>
>    Public Class Encrypt
>
>        Public Shared Function Encrypt(ByVal tcString As String, ByVal tcKey As String) As Boolean
>            Return Framework.Encrypt.Encrypt(tcString, tcKey, Me)
>        End Function
>
>        Public Shared Function Decrypt(ByVal tcString As String, ByVal sDecrKey As String) As Boolean
>            Return Framework.Encrypt.Decrypt(tcString, sDecrKey, Me)
>        End Function
>
>    End Class
>
>End Class
>
>
>Where you see the Me reference, this is where I would like to pass the equivalent This.Parent as we have in VFP.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform