Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Build configuration in C# VS 2005 [modified] Pin
Rachel88b29-Oct-07 22:33
Rachel88b29-Oct-07 22:33 
GeneralRe: C# Build configuration in C# VS 2005 Pin
Dave Kreskowiak30-Oct-07 1:34
mveDave Kreskowiak30-Oct-07 1:34 
QuestionDisplaying a progress bar while executing an SQL Query Pin
yoavyoavyoav29-Oct-07 8:40
yoavyoavyoav29-Oct-07 8:40 
AnswerRe: Displaying a progress bar while executing an SQL Query Pin
Ennis Ray Lynch, Jr.29-Oct-07 8:43
Ennis Ray Lynch, Jr.29-Oct-07 8:43 
GeneralRe: Displaying a progress bar while executing an SQL Query Pin
yoavyoavyoav29-Oct-07 9:21
yoavyoavyoav29-Oct-07 9:21 
GeneralRe: Displaying a progress bar while executing an SQL Query Pin
Ennis Ray Lynch, Jr.29-Oct-07 9:30
Ennis Ray Lynch, Jr.29-Oct-07 9:30 
QuestionBackgroundWorker, delegates, and exceptions? Pin
JerryNakamura29-Oct-07 8:21
JerryNakamura29-Oct-07 8:21 
AnswerRe: BackgroundWorker, delegates, and exceptions? Pin
Nathan Holt at EMOM29-Oct-07 9:28
Nathan Holt at EMOM29-Oct-07 9:28 
JerryNakamura wrote:
Hello. I'm attaching a delegate which throws an exception to the BackgroundWorker.DoWork event, but the exception isn't caught by the worker and passed to RunWorkerCompleted event. Apparently it has something to do with asynchronous calling of delegate, since if I make the equivalent named function and attach that to DoWork, the exception is caught as expected.

(My goal is to make a function "RunInBackgroundWithProgressDialog" so that I can launch long functions like:

RunInBackgroundWithProgressDialog(delegate(){
// open up a progress dialog with a cancel button
// do stuff that takes a long time here.
});)


Looking at your code, I think the problem is in the code you aren't showing. The code in BackgroundWorker that calls DoWork needs to call it in a try/catch block and create event args with the exception if an exception is thrown from DoWork.

Nathan
Questionprinting String problem Pin
netJP12L29-Oct-07 7:29
netJP12L29-Oct-07 7:29 
AnswerRe: printing String problem Pin
Ennis Ray Lynch, Jr.29-Oct-07 8:40
Ennis Ray Lynch, Jr.29-Oct-07 8:40 
GeneralRe: printing String problem Pin
netJP12L29-Oct-07 8:55
netJP12L29-Oct-07 8:55 
GeneralI really don't know Pin
Ennis Ray Lynch, Jr.29-Oct-07 9:13
Ennis Ray Lynch, Jr.29-Oct-07 9:13 
GeneralRe: I really don't know Pin
netJP12L29-Oct-07 9:58
netJP12L29-Oct-07 9:58 
GeneralRe: I really don't know Pin
Ennis Ray Lynch, Jr.29-Oct-07 10:18
Ennis Ray Lynch, Jr.29-Oct-07 10:18 
QuestionProblem with code after ShowDialog and XML add node Pin
Rapier50329-Oct-07 7:23
Rapier50329-Oct-07 7:23 
AnswerRe: Problem with code after ShowDialog and XML add node Pin
Andrei Ungureanu29-Oct-07 22:38
Andrei Ungureanu29-Oct-07 22:38 
QuestionHow to make sure the string has only Alphabet and Numberic in it? Pin
Khoramdin29-Oct-07 7:04
Khoramdin29-Oct-07 7:04 
AnswerRe: How to make sure the string has only Alphabet and Numberic in it? Pin
Le centriste29-Oct-07 7:17
Le centriste29-Oct-07 7:17 
Questiontranslate own syntax to c# Pin
laserbaronen29-Oct-07 5:34
laserbaronen29-Oct-07 5:34 
AnswerRe: translate own syntax to c# Pin
Colin Angus Mackay29-Oct-07 5:37
Colin Angus Mackay29-Oct-07 5:37 
GeneralRe: translate own syntax to c# Pin
laserbaronen29-Oct-07 5:39
laserbaronen29-Oct-07 5:39 
GeneralRe: translate own syntax to c# Pin
Colin Angus Mackay29-Oct-07 6:07
Colin Angus Mackay29-Oct-07 6:07 
QuestionSystem.Drawing.Image from URL. Pin
Dio2229-Oct-07 4:52
Dio2229-Oct-07 4:52 
AnswerRe: System.Drawing.Image from URL. Pin
martin_hughes29-Oct-07 5:21
martin_hughes29-Oct-07 5:21 
QuestionChecking for well formed XML Pin
Ennis Ray Lynch, Jr.29-Oct-07 4:51
Ennis Ray Lynch, Jr.29-Oct-07 4:51 

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.