Home All Groups Group Topic Archive Search About

Exiting from a console application

Author
7 Mar 2006 4:00 PM
Robe
Hi,

I want to know how can I exit from a console application in C#.

In C++ there is a function called "exit()", but I don't know if there is an
equivalent in C#.

Thanks,

Robe.

Author
7 Mar 2006 4:08 PM
David White
Robe wrote:

> Hi,
>
> I want to know how can I exit from a console application in C#.
>
> In C++ there is a function called "exit()", but I don't know if there is an
> equivalent in C#.
>
> Thanks,
>
> Robe.

How about Environment.Exit()? See
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemenvironmentclassexittopic.asp>.

AddThis Social Bookmark Button