Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper way to instantiate a class
Message
De
19/12/2005 03:56:05
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Titre:
Proper way to instantiate a class
Divers
Thread ID:
01079105
Message ID:
01079105
Vues:
76
I have created a class that I would like to instantiate at various locations in my code. The class name is Data within Framework.dll. The instantiation of the class does not represent a problem. I can compile and have it run ok. But, I have warnings all over the place wherever I am making reference to one of its method. Here is the code:
        Dim loDataProvider As Framework.Data = New Framework.Data
        If loDataProvider.SQLExec("SELECT Numero,Password,Session FROM " + tcTable + _
         " WHERE Username=""" + lcUsername + """", toConnection) = False Then
            Framework.App.nLoginSuccess = 4
            Return False
        End If
Wherever I am making a reference to loDataProvider, such as in the second line in here, I have the message:

Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
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