Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper usage of Using
Message
De
22/07/2015 09:03:34
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Proper usage of Using
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01622368
Message ID:
01622368
Vues:
42
I have a Using support in the code like this:
                    ' Create the object
                    Using loSOAPSVC = New Framework.SOAPSVC(oApp)
For tracing purposes, I am doing this temporarily:
                    oApp.AddError("1")
                    Continue For

                    ' Create the object
                    Using loSOAPSVC = New Framework.SOAPSVC(oApp)
This works.

However, if I do this:
                    ' Create the object
                    Using loSOAPSVC = New Framework.SOAPSVC(oApp)

                        oApp.AddError("1")
                        Continue For
After the Continue For is executed, I have:

"Object reference not set to an instance of an object."

Something seems to be stuck in memory because the Continue For is inside the Using. Anyone can explain this?
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