Forum guidelines
AuthorQuestion
stop c# program
Posted By Tey on 14 Dec 2007
What c# command can stop c# program after fail testing??
DON't click button.
TQ!

AuthorReply
Alan
  • 0
  • 0
Re: stop c# program
Posted By Alan on 14 Dec 2007  

If it's a Window forms application, I'd try calling Application.Exit().

If it's a console application (or Application.Exit() doesn't work), I'd call Environment.Exit(1) instead.

 


Download Free E-books

SPONSORED BY

Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.