Returning an error code from a console application.

G

Grant Smith

OK... I need a simple way to throw an error code to the operating system
in a VB.NET Console application. Return is not allowed.

Any ideas?

Thanks,
--
Grant Smith
A+, Net+, MCP x 2

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC
 
G

Grant Smith

Greg said:
Will System.Environment.ExitCode do what you need?

Greg
I'm not sure. I'll give it a try and let you know.

--
Grant Smith
A+, Net+, MCP x 2

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC
 
G

Grant Smith

Grant said:

Works like a charm, Greg.

Thanks for the advice.

Sincerely,
--
Grant Smith
A+, Net+, MCP x 2

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC
 
G

Grant Smith

Greg said:
Google Groups is your friend. Although I HATE it's new format. Sometime I
find it hard to link to correctly myself. Try this link...

http://tinyurl.com/7hydj

Greg

Ah.... Now it makes more sense... LOL. Pretty much the same advice you gave.

For anyone who is interested, there is also a
System.Environment.Exit(arg) that works as well only it exits the
application entirely when it is run.

Thanks again,
--
Grant Smith
A+, Net+, MCP x 2

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC
 

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