Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to instantiate a class
Message
From
19/12/2005 03:56:05
 
 
To
All
General information
Forum:
ASP.NET
Category:
Class design
Title:
Proper way to instantiate a class
Miscellaneous
Thread ID:
01079105
Message ID:
01079105
Views:
75
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
Next
Reply
Map
View

Click here to load this message in the networking platform