Click here to Skip to main content
15,923,051 members
Home / Discussions / C#
   

C#

 
AnswerRe: Customized date formating Pin
Colin Angus Mackay29-Oct-07 12:53
Colin Angus Mackay29-Oct-07 12:53 
GeneralRe: Customized date formating Pin
Glen Harvy29-Oct-07 15:32
Glen Harvy29-Oct-07 15:32 
GeneralRe: Customized date formating Pin
Colin Angus Mackay29-Oct-07 22:37
Colin Angus Mackay29-Oct-07 22:37 
GeneralRe: Customized date formating Pin
Glen Harvy30-Oct-07 1:31
Glen Harvy30-Oct-07 1:31 
GeneralRe: Customized date formating Pin
Glen Harvy29-Oct-07 16:56
Glen Harvy29-Oct-07 16:56 
GeneralRe: Customized date formating Pin
Colin Angus Mackay29-Oct-07 22:43
Colin Angus Mackay29-Oct-07 22:43 
GeneralRe: Customized date formating Pin
Glen Harvy30-Oct-07 1:33
Glen Harvy30-Oct-07 1:33 
AnswerRe: Customized date formating Pin
PIEBALDconsult29-Oct-07 14:32
mvePIEBALDconsult29-Oct-07 14:32 
QuestionQuestion On Multithreading Lock Pin
cateyes9929-Oct-07 11:25
cateyes9929-Oct-07 11:25 
AnswerRe: Question On Multithreading Lock Pin
Daniel Grunwald29-Oct-07 11:53
Daniel Grunwald29-Oct-07 11:53 
GeneralRe: Question On Multithreading Lock Pin
cateyes9929-Oct-07 15:19
cateyes9929-Oct-07 15:19 
QuestionCast from string/text to int Pin
Manfr3d29-Oct-07 10:58
Manfr3d29-Oct-07 10:58 
AnswerRe: Cast from string/text to int Pin
DavidNohejl29-Oct-07 11:06
DavidNohejl29-Oct-07 11:06 
AnswerRe: Cast from string/text to int Pin
snorkie29-Oct-07 11:20
professionalsnorkie29-Oct-07 11:20 
AnswerRe: Cast from string/text to int [modified] Pin
Spiff Dog29-Oct-07 13:56
Spiff Dog29-Oct-07 13:56 
QuestionC# Build configuration in C# VS 2005 [modified] Pin
Rachel88b29-Oct-07 8:48
Rachel88b29-Oct-07 8:48 
AnswerRe: C# Build configuration in C# VS 2008 Pin
Dave Kreskowiak29-Oct-07 11:17
mveDave Kreskowiak29-Oct-07 11:17 
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

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.