473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Returning an error code from a console application.

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
Nov 23 '05 #1
7 7615
Will System.Environment.ExitCode do what you need?

Greg

"Grant Smith" <gr*********@envent-tech.com> wrote in message
news:LZuff.582660$xm3.226077@attbi_s21...
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

Nov 23 '05 #2
Greg Burns wrote:
Will System.Environment.ExitCode do what you need?

Greg

"Grant Smith" <gr*********@envent-tech.com> wrote in message
news:LZuff.582660$xm3.226077@attbi_s21...
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


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
Nov 23 '05 #3
"Grant Smith" <gr*********@envent-tech.com> schrieb:
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.


<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/msg/3a6bf0b5f025d3f1>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #4
Grant Smith wrote:
Greg Burns wrote:
Snip
Snip


Snip


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
Nov 23 '05 #5
Herfried K. Wagner [MVP] wrote:
"Grant Smith" <gr*********@envent-tech.com> schrieb:
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.

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/msg/3a6bf0b5f025d3f1>


I'm not sure what you're getting at with this. I see the question that
was posed but I see no answers.

Thanks, though.

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

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC
Nov 23 '05 #6
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

"Grant Smith" <gr*********@envent-tech.com> wrote in message
news:UQLff.561898$_o.4817@attbi_s71...
Herfried K. Wagner [MVP] wrote:
"Grant Smith" <gr*********@envent-tech.com> schrieb:
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.

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/msg/3a6bf0b5f025d3f1>


I'm not sure what you're getting at with this. I see the question that was
posed but I see no answers.

Thanks, though.

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

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC

Nov 23 '05 #7
Greg Burns wrote:
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

"Grant Smith" <gr*********@envent-tech.com> wrote in message
news:UQLff.561898$_o.4817@attbi_s71...
Herfried K. Wagner [MVP] wrote:
"Grant Smith" <gr*********@envent-tech.com> schrieb:
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.
<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/msg/3a6bf0b5f025d3f1>


I'm not sure what you're getting at with this. I see the question that was
posed but I see no answers.

Thanks, though.

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

Quality Production Liaison
Hewlett Packard Company

Database Administrator
Renaissance Systems and Services, LLC



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
Nov 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: omission9 | last post by:
Any advice on the following would be much appreciated. I have thrown everything I have at it and am completely stumped. I apologize for the length, I have tried to be as succint as possible. I...
4
by: David Moore | last post by:
Hello I am using the System.DirectoryServices namespace classes to access Active Directory. We connect using the LDAP://DOMAIN method. The code works on local dev boxes, and in staging, but...
1
by: limelight | last post by:
I have discovered a math error in the .NET framework's Log function. It returns incorrect results for varying powers of 2 that depend on whether the program is run from within the IDE or from the...
5
by: Gent | last post by:
I have two questions which are very similar: Is it possible to return an object in C++. Below is part of my code for reference however I am more concerned about the concept. It seems like the...
3
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from...
1
by: Ravi | last post by:
Hi , i am trying to pass the same session Id to all the webrequest, but sometimes the response.cookies returns zero and sometimes one. is this to do something with cookies expire. In this sample...
7
by: rbeyea | last post by:
I am writing a DLL (DLL1) that is wrapping another DLL (DLL2). I need to extract the information returned from DLL2 and pass it out to the Client application this is using DLL1. DLL2 returns...
0
by: Anbu | last post by:
Hi All, I have two web services, where first application receives a request and sends the request to the second web service. Based on the response received from second application, the first...
0
by: Stephen Thomas | last post by:
Hi there I wonder if any one has encountered this problem or can suggest what is wrong. I am trying the a procedure from the msn site but get the following message: Error 1 The type or...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.