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 eBooks

SPONSORED BY

JetBrains ReSharper Ultimate
.NET code analysis, refactorings, navigation, unit testing, code coverage and profiling in Visual Studio, a bonus for C++ devs, bundled at 50% off.