Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to stop New() execution
Message
From
30/10/2006 07:52:59
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
29/10/2006 20:23:40
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01165405
Message ID:
01165466
Views:
9
Michel what I do is raise an exception that I catch on the caller class.

>I have a class which contains a New() event. On the object, I also have a New() event which contains as the first line the MyBase() code to call the default New() event. However, in the New() event of the object, on a particular situation, I need to avoid the creation of the object. Basically, on a specific condition, I need to redirect to another page and stop the execution of the New() event. How can one accomplish this?
Alexandre Palma
Senior Application Architect
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform