Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Output debug message
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01030241
Message ID:
01030428
Vues:
17
Chad,
Aborting the thread does not change the code and throwing an exception in the thread does not change the code.
Einar

>Einar,
>
>I'm sure someone else could explain this better than me. I was referring more to the app itself. When you define your main method:
>
>public static void Main()
>OR
>public static int Main()
>
>Both signatures are valid. As far as threads go, I think the only way they return a code other than zero is by throwing exceptions. If you Abort a thread, an exception is thrown and a non-zero exit code is generated. I would guess that you can throw any exception within the thread to have it exit with a non-zero code, also.
>
>Most of the time, people ignore exit codes from threads and apps (they just kick them off and let them run), but you can verify that they ran successfully by checking return codes, I believe.
>
>HTH,
>Chad
>
>>Chad,
>>When I am using:
>>
>>Thread oThread = new Thread(new ThreadStart(oAlpha.Beta));
>>
>>
>>The method called by ThreadStart (in this case Beta()) must return void. I can't declare the method to return anything else. Are we talking about the same thing? Please feel free to explain further.
>>
>>Thanks,
>>Einar
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform