Application Exit

This is a discussion on Application Exit within the C# Programming forums, part of the General Programming Boards category; I know everyone is probably tired of seeing my posts here, and I am sorry. But how will I know ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    Application Exit

    I know everyone is probably tired of seeing my posts here, and I am sorry. But how will I know unless I ask. Question: I have a console application that goes pretty deep into class instantiations. If I am deep within the classes and encounter a situation where I just want to stop the entire program, how should I do that. I tried Application.Exit(), but that did not work. What would you suggest?????

    Thanks,
    Kendal

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,138
    Throw an exception and catch it in the outermost instance ( or not at all if you don't care for proper handling, just for program abortion ).
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Perfect!!! Thanks a million.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Application refusing to exit
    By legit in forum C++ Programming
    Replies: 2
    Last Post: 06-16-2009, 04:16 AM
  2. Odd memory leaks
    By VirtualAce in forum C++ Programming
    Replies: 11
    Last Post: 05-25-2006, 12:56 AM
  3. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  4. Dynamic array of pointers
    By csisz3r in forum C Programming
    Replies: 8
    Last Post: 09-25-2005, 02:06 PM

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