Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a class instance as a parameter
Message
 
To
17/04/2006 21:35:02
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01114205
Message ID:
01114244
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform