Is it possible to get a return value other than error level from .net exe? The exe is to be called from a script, batch or rexx.
If not, can you invoke a method in an assembly from batch or rexx and retrieve a return value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The entry (and exit) point of any .NET executable is the main method, which has to be a Static method declared with either a
voidorintreturn type.For this reason, you cannot directly return anything other than an
int.This
intvalue is the error level (by convention, 0 means successful).You can still in your program write to a “status” file that will allow you to write whatever you want and read from it.