Environment.Exit

This is a discussion on Environment.Exit within the C# Programming forums, part of the General Programming Boards category; Hello everyone, When we call Environment.Exit to terminates a console application or a Windows service, 1. All the expected finally ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    Environment.Exit

    Hello everyone,


    When we call Environment.Exit to terminates a console application or a Windows service,

    1.

    All the expected finally blocks are ensured to be executed, so resource leak?

    2.

    No exception occured (i.e. when invoking Environment.Exit, no exception thrown, like invoking Thread.Abort will throw ThreadAbortException?)


    thanks in advance,
    George

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    Dude, read the manuals before posting the same question!
    Application.Exit
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Salem,


    The link you quoted is about Application.Exit, but I am discussing Environment.Exit. :-)

    Quote Originally Posted by Salem View Post
    Dude, read the manuals before posting the same question!
    Application.Exit

    regards,
    George

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21