Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper way to pass an object
Message
De
10/01/2007 00:57:13
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Proper way to pass an object
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01184064
Message ID:
01184064
Vues:
58
I have something weird when trying to pass an object to a method.

If I have this:
        Dim loParameterClass(1) As Object

        loParameterClass(0) = oApp
        loParameterClass(1) = Me
and use this object later on down the code, it will work. But, if I pass this object to a method like this:
            ' Execute the method
            If Not ExecuteMethodFromClass(oApp.cStartupDirectory + "Robot.exe", "Robot", _
             loRow("Class"), loRow("Method"), loParameterClass) Then
                Return False
            End If
and, the method is declared like this:
Public Function ExecuteMethodFromClass(ByVal tcAssembly As String, _
     ByVal tcNamespace As String, ByVal tcClass As String, _
     ByVal tcMethod As String, ByVal toParameter As Object) As Boolean
In that method, I cannot make use of the toParameter object. It seems I have a problem in the declaration. So, basically, what is the proper way of passing such an object to the method and have it recognized as is inside the method?
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