How to do "die in php" under VB.net and ASP.net

B

Benson

In php coding:
....
if(something wrong)
die("stop here");
....
....

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)

Benson
VS2005
 
G

Guest

In php coding:
...
if(something wrong)
die("stop here");
...
...

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)


Try
My Code Here
Catch ex as exception
Handle exception here
End Try
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Benson said:
In php coding:
...
if(something wrong)
die("stop here");
...
...

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)

Benson
VS2005

I don't know exactly what die does in PHP, but I suppose it's the
equivalent of throwing an exception in .NET.

If something is Nothing Then
Throw New ArgumentNullException("Argument 'something' may not be null.")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top