Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart22-May-04 2:47
protectorHeath Stewart22-May-04 2:47 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart22-May-04 3:38
protectorHeath Stewart22-May-04 3:38 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Dimitris Iliopoulos23-May-04 3:46
Dimitris Iliopoulos23-May-04 3:46 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart23-May-04 3:49
protectorHeath Stewart23-May-04 3:49 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Parrish23-May-04 7:17
Parrish23-May-04 7:17 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart23-May-04 7:43
protectorHeath Stewart23-May-04 7:43 
Generalabout one Process, multi AppDomain Design Pin
pig123421-May-04 14:52
pig123421-May-04 14:52 
GeneralRe: about one Process, multi AppDomain Design Pin
Heath Stewart22-May-04 2:45
protectorHeath Stewart22-May-04 2:45 
Assembly A is the process. When your entry point method terminates, so does the program. This is why facilities like Application.Run and message pumps exist - to keep the application running. If creating your second AppDomain and executing an assembly fails, then your method continues and terminates, thus your application terminates. That's the way it works. And since you executed assembly B in a new thread, when the exception is thrown the thread is aborted if it's not handled. Since you are handling, then threaded method continues and terminates.

If you want to execute assembly A and B independently of each other, then you should create a new AppDomain for each assembly and launch them from a separate process with a little better exception handling.

You also need to consider a loop that keeps methods running until you want them stopped. If you're working with Windows Forms, Application.Run creates a message pump that translates and dispatches Windows message which are still at the heart of Windows Forms. If you're not using Windows Forms, you'll have to have your own loop and be sure to perform good exception handling since you don't want your app stuck in an infinite loop, forcing the client to kill it.

 

Microsoft MVP, Visual C#
My Articles
GeneralPrinting a .pdf Pin
TigerNinja_21-May-04 11:55
TigerNinja_21-May-04 11:55 
GeneralRe: Printing a .pdf Pin
Dave Kreskowiak21-May-04 12:24
mveDave Kreskowiak21-May-04 12:24 
GeneralVolume Control Pin
kratchkov21-May-04 10:15
kratchkov21-May-04 10:15 
QuestionHow Can I Unload an Assembly? Pin
goodpilot21-May-04 10:15
goodpilot21-May-04 10:15 
AnswerRe: How Can I Unload an Assembly? Pin
Heath Stewart21-May-04 10:49
protectorHeath Stewart21-May-04 10:49 
AnswerRe: How Can I Unload an Assembly? Pin
Marc Clifton22-May-04 14:58
mvaMarc Clifton22-May-04 14:58 
GeneralRe: How Can I Unload an Assembly? Pin
goodpilot26-May-04 3:17
goodpilot26-May-04 3:17 
GeneralOverloading Pin
Gary Kirkham21-May-04 9:39
Gary Kirkham21-May-04 9:39 
GeneralRe: Overloading Pin
Heath Stewart21-May-04 9:56
protectorHeath Stewart21-May-04 9:56 
GeneralRe: Overloading Pin
Gary Kirkham21-May-04 10:07
Gary Kirkham21-May-04 10:07 
GeneralRe: Overloading Pin
Heath Stewart21-May-04 10:12
protectorHeath Stewart21-May-04 10:12 
GeneralRe: Overloading Pin
Dave Kreskowiak21-May-04 9:56
mveDave Kreskowiak21-May-04 9:56 
GeneralRe: Overloading Pin
Curi0us_George21-May-04 19:55
Curi0us_George21-May-04 19:55 
GeneralRe: Overloading Pin
Gary Kirkham24-May-04 5:09
Gary Kirkham24-May-04 5:09 
GeneralRe: Overloading Pin
Curi0us_George24-May-04 9:16
Curi0us_George24-May-04 9:16 
GeneralReflection Pin
SirMorrisBig21-May-04 9:31
SirMorrisBig21-May-04 9:31 
GeneralRe: Reflection Pin
Heath Stewart21-May-04 9:36
protectorHeath Stewart21-May-04 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.